From 5bae8bffb8740254ab7c46f0416c915b653b812a Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Wed, 18 Oct 2023 16:22:55 +0100 Subject: [PATCH] Remove certain command line options Remove from the documentation the command line options that are not preceded by a hyphen. These are: file, File, raise, view These options are still processed - just no longer shown in help/man. --- doc/docbook/CommandLineOptions.xml | 30 +++--------------------------- geeqie.1 | 16 ++-------------- src/remote.cc | 9 +++++---- 3 files changed, 10 insertions(+), 45 deletions(-) diff --git a/doc/docbook/CommandLineOptions.xml b/doc/docbook/CommandLineOptions.xml index 7288257e..e3acac0a 100644 --- a/doc/docbook/CommandLineOptions.xml +++ b/doc/docbook/CommandLineOptions.xml @@ -7,8 +7,8 @@ GEEQIE 1 -August 2023 -Geeqie 2.1+git20230810-c41eb43c GTK3 +October 2023 +Geeqie 2.1+git20231016-1a72d946 GTK3 Geeqie @@ -30,7 +30,7 @@ zooming, panning, thumbnails and sorting images into collections. Generated for version: -Geeqie 2.1+git20230810-c41eb43c +Geeqie 2.1+git20231016-1a72d946 Valid options: @@ -238,24 +238,12 @@ zooming, panning, thumbnails and sorting images into collections. --file:<FILE>|<URL> -open FILE or URL, bring Geeqie window to the top - - - - file:<FILE>|<URL> - open FILE or URL, bring Geeqie window to the top --File:<FILE>|<URL> -open FILE or URL, do not bring Geeqie window to the top - - - - File:<FILE>|<URL> - open FILE or URL, do not bring Geeqie window to the top @@ -406,12 +394,6 @@ zooming, panning, thumbnails and sorting images into collections. --raise -bring the Geeqie window to the top - - - - raise - bring the Geeqie window to the top @@ -479,12 +461,6 @@ zooming, panning, thumbnails and sorting images into collections. --view:<FILE> open FILE in new window - - - - view:<FILE> - -open FILE in new window All other command line parameters are used as plain files if they exist. diff --git a/geeqie.1 b/geeqie.1 index 5fc6bc58..a8bcf256 100644 --- a/geeqie.1 +++ b/geeqie.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH GEEQIE "1" "August 2023" "Geeqie 2.1+git20230810-c41eb43c GTK3" "User Commands" +.TH GEEQIE "1" "October 2023" "Geeqie 2.1+git20231016-1a72d946 GTK3" "User Commands" .SH NAME Geeqie - GTK based multiformat image viewer .SH SYNOPSIS @@ -11,7 +11,7 @@ zooming, panning, thumbnails and sorting images into collections. Generated for version: .PP -Geeqie 2.1+git20230810\-c41eb43c +Geeqie 2.1+git20231016\-1a72d946 .SS "Valid options:" .TP \fB\-\-blank\fR @@ -116,15 +116,9 @@ toggle full screen \fB\-\-file\fR:| open FILE or URL, bring Geeqie window to the top .TP -file:| -open FILE or URL, bring Geeqie window to the top -.TP \fB\-\-File\fR:| open FILE or URL, do not bring Geeqie window to the top .TP -File:| -open FILE or URL, do not bring Geeqie window to the top -.TP \fB\-fs\fR \fB\-\-fullscreen\-start\fR start full screen .TP @@ -200,9 +194,6 @@ quit \fB\-\-raise\fR bring the Geeqie window to the top .TP -raise -bring the Geeqie window to the top -.TP \fB\-\-selection\-add\fR:[] adds the current file (or the specified file) to the current selection .TP @@ -235,9 +226,6 @@ hide tools .TP \fB\-\-view\fR: open FILE in new window -.TP -view: -open FILE in new window .IP All other command line parameters are used as plain files if they exist. .IP diff --git a/src/remote.cc b/src/remote.cc index db6096f5..d333256a 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -1809,10 +1809,11 @@ void remote_help() { s_opt_param = g_strdup(remote_commands[i].opt_s ? remote_commands[i].opt_s : "" ); l_opt_param = g_strconcat(remote_commands[i].opt_l, remote_commands[i].parameter, NULL); - printf_term(FALSE, " %-4s %-40s%-s\n", - s_opt_param, - l_opt_param, - _(remote_commands[i].description)); + + if (g_str_has_prefix(l_opt_param, "--")) + { + printf_term(FALSE, " %-4s %-40s%-s\n", s_opt_param, l_opt_param, _(remote_commands[i].description)); + } g_free(s_opt_param); g_free(l_opt_param); } -- 2.20.1