Kaydet (Commit) 642889e9 authored tarafından Enrico Tröger's avatar Enrico Tröger

Reordered command line options alphabetically.

Added new command line option --line to set the initial line for the first opened file.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@863 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 01c885c5
......@@ -3,6 +3,10 @@
* src/callbacks.c: Save configuration(i.e. list of open files) as late
as possible and save the filetype build commands
first shortly before quitting.
* doc/geany.docbook, doc/geany.1.in, src/main.c, src/document.c:
Reordered command line options alphabetically.
Added new command line option --line to set the initial line for the
first opened file.
2006-10-02 Nick Treleaven <nick.treleaven@btinternet.com>
......
.TH "GEANY" "1" "September 29, 2006" "@PACKAGE@ @VERSION@" ""
.TH "GEANY" "1" "October 03, 2006" "@PACKAGE@ @VERSION@" ""
.SH "NAME"
Geany \(em a small and lightweight IDE
.SH "SYNOPSIS"
......@@ -13,40 +13,45 @@ many supported filetypes like C(++), Java, PHP, HTML, DocBook, Perl and more.
.PP
Homepage: http://geany.uvena.de
Set initial line number for the first opened file
.SH "OPTIONS"
.IP "\fB-n\fP \fB\-\-no-ctags\fP " 10
Don't load auto completion and call tip data. Use this option, if you don't want to use them.
For more information please see documentation.
.IP "\fB-c\fP \fB\-\-config\fP " 10
Use an alternate configuration directory. Default configuration directory is
~/.geany/ and there resides geany.conf and some template files.
.IP "\fB-d\fP \fB\-\-debug\fP " 10
Runs Geany in debug mode, which means being verbose and printing lots of information.
.IP "\fB-i\fP \fB\-\-new-instance\fP " 10
Don't open files in a running instance, force opening a new instance.
Only available if Geany was compiled with support for Sockets.
.IP "\fB-l\fP \fB\-\-line\fP " 10
Set initial line number for the first opened file.
.IP "\fB-m\fP \fB\-\-no-msgwin\fP " 10
Don't show the message window. Use this option if you don't need compiler messages
or VTE support.
.IP "\fB-i\fP \fB\-\-new-instance\fP " 10
Don't open files in a running instance, force opening a new instance.
.IP "\fB-n\fP \fB\-\-no-ctags\fP " 10
Don't load auto completion and call tip data. Use this option, if you don't want to use them.
For more information please see documentation.
.IP "\fB-s\fP \fB\-\-no-session\fP " 10
Don't load the previous session's files
.IP "\fB-t\fP \fB\-\-no-terminal\fP " 10
Don't load terminal support. Use this option, if you don't want to load the virtual terminal
emulator widget at startup. If you don't have libvte.so.4 installed, then terminal-support is
automatically disabled.
.IP "\fB-l\fP \fB\-\-vte-lib\fP " 10
automatically disabled. Only available if Geany was compiled with support for VTE.
.IP "\fB\fP \fB\-\-vte-lib\fP " 10
Specify explicitly the path including filename or only the filename to the VTE library, e.g.
/usr/lib/libvte.so or libvte.so. This option is only needed, when the autodetection doesn't
work.
.IP "\fB-c\fP \fB\-\-config\fP " 10
Use an alternate configuration directory. Default configuration directory is
~/.geany/ and there resides geany.conf and some template files.
.IP "\fB-d\fP \fB\-\-debug\fP " 10
Runs geany in debug mode, which means being verbose and printing lots of information.
.IP "\fB-?\fP \fB\-\-help\fP " 10
Show help information and exit.
work. Only available if Geany was compiled with support for VTE.
.IP "\fB-v\fP \fB\-\-version\fP " 10
Show version information and exit.
.IP "\fB-?\fP \fB\-\-help\fP " 10
Show help information and exit.
.PP
geany supports all generic GTK options, a list is available on the help screen.
Geany supports all generic GTK options, a list is available on the help screen.
.SH "AUTHOR"
.PP
This manual page was written by Enrico Troeger <enrico.troeger@uvena.de>. Permission is
This manual page was written by Enrico Tröger <enrico.troeger@uvena.de>. Permission is
granted to copy, distribute and/or modify this document under
the terms of the GNU General Public License, Version 2 any
later version published by the Free Software Foundation.
......
......@@ -236,16 +236,32 @@
</thead>
<tbody>
<row>
<entry>-s</entry>
<entry>--no-session</entry>
<entry>Don't load the previous session's files.
<entry>-c dir_name</entry>
<entry>--config=directory_name</entry>
<entry>Use an alternate configuration directory. Default
configuration directory is <filename>~/.&app_small;/</filename>
and there resides <filename>&app_small;.conf</filename> and
other configuration files.
</entry>
</row>
<row>
<entry>-n</entry>
<entry>--no-ctags</entry>
<entry>Do not load auto completion and call tip data.
Use this option if you do not want to use them.
<entry>-d</entry>
<entry>--debug</entry>
<entry>Run &app; in debug mode, which means being verbose
and printing lots of information.
</entry>
</row>
<row>
<entry>-i</entry>
<entry>--new-instance</entry>
<entry>Do not open files in a running instance, force opening a new instance.
Only available if &app; was compiled with support for Sockets.
</entry>
</row>
<row>
<entry>-l</entry>
<entry>--line</entry>
<entry>Set initial line number for the first opened file.
</entry>
</row>
<row>
......@@ -256,9 +272,16 @@
</entry>
</row>
<row>
<entry>-i</entry>
<entry>--new-instance</entry>
<entry>Do not open files in a running instance, force opening a new instance.
<entry>-n</entry>
<entry>--no-ctags</entry>
<entry>Do not load auto completion and call tip data.
Use this option if you do not want to use them.
</entry>
</row>
<row>
<entry>-s</entry>
<entry>--no-session</entry>
<entry>Don't load the previous session's files.
</entry>
</row>
<row>
......@@ -267,44 +290,30 @@
<entry>Do not load terminal support. Use this option if you do not
want to load the virtual terminal emulator widget at startup.
If you do not have <filename>libvte.so.4</filename> installed,
then terminal-support is automatically disabled.
then terminal-support is automatically disabled. Only available
if &app; was compiled with support for VTE.
</entry>
</row>
<row>
<entry>-l</entry>
<entry></entry>
<entry>--vte-lib</entry>
<entry>Specify explicitly the path including filename or only the filename
to the VTE library, e.g. <filename>/usr/lib/libvte.so</filename> or
<filename>libvte.so</filename>. This option is only needed when the
autodetection does not work.
autodetection does not work. Only available if &app; was compiled
with support for VTE.
</entry>
</row>
<row>
<entry>-c directory_name</entry>
<entry>--config=directory_name</entry>
<entry>Use an alternate configuration directory. Default
configuration directory is <filename>~/.&app_small;/</filename>
and there resides <filename>&app_small;.conf</filename> and
other configuration files.
</entry>
</row>
<row>
<entry>-d</entry>
<entry>--debug</entry>
<entry>Run &app; in debug mode, which means being verbose
and printing lots of information.
</entry>
<entry>-v</entry>
<entry>--version</entry>
<entry>Show version information and exit.</entry>
</row>
<row>
<entry>-?</entry>
<entry>--help</entry>
<entry>Show help information and exit.</entry>
</row>
<row>
<entry>-v</entry>
<entry>--version</entry>
<entry>Show version information and exit.</entry>
</row>
<row>
<entry></entry>
<entry>[files ...]</entry>
......
......@@ -650,7 +650,13 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado
doc_list[idx].encoding = enc;
doc_list[idx].has_bom = bom;
sci_goto_pos(doc_list[idx].sci, pos, TRUE);
if (cl_options.goto_line >= 0)
{ // goto line which was specified on command line and then undefine the line
sci_goto_line_scroll(doc_list[idx].sci, cl_options.goto_line - 1, 0.25);
cl_options.goto_line = -1;
}
else if (pos >= 0)
sci_goto_pos(doc_list[idx].sci, pos, TRUE);
if (! reload)
{
......
......@@ -81,20 +81,21 @@ static gboolean generate_datafiles = FALSE;
static GOptionEntry entries[] =
{
{ "config", 'c', 0, G_OPTION_ARG_FILENAME, &alternate_config, N_("use an alternate configuration directory"), NULL },
{ "debug", 'd', 0, G_OPTION_ARG_NONE, &debug_mode, N_("runs in debug mode (means being verbose)"), NULL },
{ "no-session", 's', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &cl_options.load_session, N_("don't load the previous session's files"), NULL },
{ "no-ctags", 'n', 0, G_OPTION_ARG_NONE, &ignore_global_tags, N_("don't load auto completion data (see documentation)"), NULL },
{ "generate-data-files", 'g', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &generate_datafiles, "", NULL },
#ifdef HAVE_SOCKET
{ "new-instance", 'i', 0, G_OPTION_ARG_NONE, &ignore_socket, N_("don't open files in a running instance, force opening a new instance"), NULL },
#endif
{ "config", 'c', 0, G_OPTION_ARG_FILENAME, &alternate_config, N_("use an alternate configuration directory"), NULL },
{ "line", 'l', 0, G_OPTION_ARG_INT, &cl_options.goto_line, N_("set initial line number for the first opened file"), NULL },
{ "no-msgwin", 'm', 0, G_OPTION_ARG_NONE, &no_msgwin, N_("don't show message window at startup"), NULL },
{ "no-ctags", 'n', 0, G_OPTION_ARG_NONE, &ignore_global_tags, N_("don't load auto completion data (see documentation)"), NULL },
{ "no-session", 's', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &cl_options.load_session, N_("don't load the previous session's files"), NULL },
#ifdef HAVE_VTE
{ "no-terminal", 't', 0, G_OPTION_ARG_NONE, &no_vte, N_("don't load terminal support"), NULL },
{ "vte-lib", 'l', 0, G_OPTION_ARG_FILENAME, &lib_vte, N_("filename of libvte.so"), NULL },
{ "vte-lib", 0, 0, G_OPTION_ARG_FILENAME, &lib_vte, N_("filename of libvte.so"), NULL },
#endif
{ "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, N_("show version and exit"), NULL },
{ "generate-data-files", 'g', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &generate_datafiles, "", NULL },
{ NULL, 0, 0, 0, NULL, NULL, NULL }
};
......@@ -384,6 +385,7 @@ static void parse_command_line_options(gint *argc, gchar ***argv)
// first initialise cl_options fields with default values
cl_options.load_session = TRUE;
cl_options.goto_line = -1;
context = g_option_context_new(_(" - A fast and lightweight IDE"));
g_option_context_add_main_entries(context, entries, GETTEXT_PACKAGE);
......
......@@ -28,6 +28,7 @@
typedef struct
{
gboolean load_session;
gint goto_line;
} CommandLineOptions;
extern CommandLineOptions cl_options;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment