On 27/08/15 20:43, Stephane Chazelas wrote:
> 2015-08-27 16:18:51 +0100, Pádraig Brady:
> [...]
>>> info page:
> [...]
>>> It's easy to miss that it's not `-d[FROM]` here. A note along
>>> these lines could help:
>>>
>>> "Note that the FROM value can only be specified with the long
>>> option from."
>>
>> Done at:
>> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=da5505dd7f
> 
> Thanks.
> 
>> I can't think of any suitably terse improvements for the man page.
> [...]
> 
> Maybe something like:
> 
>   -d                          use numeric suffixes instead of alphabetic
>                               (starting at 0)
>   --numeric-suffixes[=FROM]   same as above but allows changing the
>                               starting value.
> 
> As in effect, they are different options.
> 

I'll apply the attached later.

thanks,
Pádraig.
>From a83f703a9bf9412417be94848a4ed7b7f1c1fc4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Mon, 31 Aug 2015 18:07:34 +0100
Subject: [PATCH] doc: clarify in --help/man where short options take no param

* src/shred.c (usage): For -u, separate the decscription
of the short and long option, to clarify that the short option
takes no parameter.
* src/split.c (usage): Likewise for -d.
* src/tee.c (usage): Likewise for -p.
* src/uniq.c (usage): Likewise for -D.

Suggested by Stephane Chazelas
---
 src/shred.c | 3 ++-
 src/split.c | 5 +++--
 src/tee.c   | 3 ++-
 src/uniq.c  | 7 ++++---
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/shred.c b/src/shred.c
index 52c93ef..195b5d2 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -185,7 +185,8 @@ If FILE is -, shred standard output.\n\
   -s, --size=N   shred this many bytes (suffixes like K, M, G accepted)\n\
 "), DEFAULT_PASSES);
       fputs (_("\
-  -u, --remove[=HOW]  truncate and remove file after overwriting; See below\n\
+  -u             truncate and remove file after overwriting\n\
+      --remove[=HOW]  like -u but give control on HOW to delete;  See below\n\
   -v, --verbose  show progress\n\
   -x, --exact    do not round file sizes up to the next full block;\n\
                    this is the default for non-regular files\n\
diff --git a/src/split.c b/src/split.c
index 35f2629..1e6bec6 100644
--- a/src/split.c
+++ b/src/split.c
@@ -238,8 +238,9 @@ default size is 1000 lines, and default PREFIX is 'x'.\n\
       --additional-suffix=SUFFIX  append an additional SUFFIX to file names\n\
   -b, --bytes=SIZE        put SIZE bytes per output file\n\
   -C, --line-bytes=SIZE   put at most SIZE bytes of records per output file\n\
-  -d, --numeric-suffixes[=FROM]  use numeric suffixes instead of alphabetic;\n\
-                                   FROM changes the start value (default 0)\n\
+  -d                      use numeric suffixes starting at 0, not alphabetic\n\
+      --numeric-suffixes[=FROM]  same as -d, but allow setting the start value\
+\n\
   -e, --elide-empty-files  do not generate empty output files with '-n'\n\
       --filter=COMMAND    write to shell COMMAND; file name is $FILE\n\
   -l, --lines=NUMBER      put NUMBER lines/records per output file\n\
diff --git a/src/tee.c b/src/tee.c
index 3c39a4a..35120f8 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -91,7 +91,8 @@ Copy standard input to each FILE, and also to standard output.\n\
   -i, --ignore-interrupts   ignore interrupt signals\n\
 "), stdout);
       fputs (_("\
-  -p, --output-error[=MODE]  behavior on write error.  See MODE details below\n\
+  -p                        diagnose errors writing to non pipes\n\
+      --output-error[=MODE]   set behavior on write error.  See MODE below\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
diff --git a/src/uniq.c b/src/uniq.c
index e0cfe4d..8dfb7ea 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -185,9 +185,10 @@ With no options, matching lines are merged to the first occurrence.\n\
   -d, --repeated        only print duplicate lines, one for each group\n\
 "), stdout);
      fputs (_("\
-  -D, --all-repeated[=METHOD]  print all duplicate lines;\n\
-                          groups can be delimited with an empty line;\n\
-                          METHOD={none(default),prepend,separate}\n\
+  -D                    print all duplicate lines\n\
+      --all-repeated[=METHOD]  like -D, but allow separating groups\n\
+                                 with an empty line;\n\
+                                 METHOD={none(default),prepend,separate}\n\
 "), stdout);
      fputs (_("\
   -f, --skip-fields=N   avoid comparing the first N fields\n\
-- 
2.4.1

Reply via email to