bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] groff-1.20.1: [troff] suggest to use option -V for --version


From: Jari Aalto
Subject: [PATCH] groff-1.20.1: [troff] suggest to use option -V for --version
Date: Fri, 20 Mar 2009 23:49:20 +0200

GROFF VERSION:
groff-1.20.1

MACHINE:
i386

OS:
Debian testing

COMPILER:
g++ (Debian 4.3.3-3) 4.3.3

INPUT FILES:
<none>

COMMAND LINE:
<none>

DESCRIPTION OF INCORRECT BEHAVIOUR:
Version option change from -v to -V

SUGGESTED FIX [optional]:
It would help if programs could in some extent unify the UI, so that
options would be closely the same. It is common to consider option -v as
synonym for --verbose. An observation, that is based on everyday usage
of GNU programs (cp -v, mv -v ...).

>From user perspective, unifying the command line options would be a good
thing, thus I propose changing -v option to uppercase -V. The -v and
--verbose could be reserved for later user [1].

The patch below acommplishes this.

Jari

[1] See
http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces

>From 89e4126b58754ffa5f5a2daf05ad4c0f5b43954d Mon Sep 17 00:00:00 2001
From: Jari Aalto <address@hidden>
Date: Fri, 20 Mar 2009 23:38:58 +0200
Subject: [PATCH] src/roff/troff/input.cpp, src/roff/troff/troff.man: Use -V for 
version option (not -v)

Signed-off-by: Jari Aalto <address@hidden>
---
 src/roff/troff/input.cpp |    4 ++--
 src/roff/troff/troff.man |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 8038f70..5ec9ea4 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -7501,11 +7501,11 @@ int main(int argc, char **argv)
 #define DEBUG_OPTION "D"
 #endif
   while ((c = getopt_long(argc, argv,
-                         "abciI:vw:W:zCEf:m:n:o:r:d:F:M:T:tqs:RU"
+                         "abciI:Vw:W:zCEf:m:n:o:r:d:F:M:T:tqs:RU"
                          DEBUG_OPTION, long_options, 0))
         != EOF)
     switch(c) {
-    case 'v':
+    case 'V':
       {
        printf("GNU troff (groff) version %s\n", Version_string);
        exit(0);
diff --git a/src/roff/troff/troff.man b/src/roff/troff/troff.man
index 6c53f4d..39a5221 100644
--- a/src/roff/troff/troff.man
+++ b/src/roff/troff/troff.man
@@ -268,7 +268,7 @@ otherwise.
 It will also add the current directory to the macro search path.
 .
 .TP
-.B \-v
+.B \-V
 Print the version number.
 .
 .TP
-- 
1.6.1.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]