]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: make command synopsis more consistent
authorPádraig Brady <P@draigBrady.com>
Tue, 3 Jun 2025 21:58:38 +0000 (22:58 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 3 Jun 2025 22:11:44 +0000 (23:11 +0100)
* doc/coreutils.texi: Use @dots{} after [OPTION],
to be consistent with man pages.
* src/printenv.c (Usage): Remove unneeded "...".
* src/timeout.c (Usage): Add needed "...",
and also remove redundant [OPTION] only form.
* src/chroot.c (Usage): Likewise.
Fixes https://bugs.gnu.org/78628

doc/coreutils.texi
src/chroot.c
src/printenv.c
src/timeout.c

index d1c282f562f25b796823f7d223c1bfa67ad1e8bf..7556571d7d83d9660b068cb4e72f536273f63344 100644 (file)
@@ -1656,7 +1656,7 @@ in some way.
 standard input if none are given, to standard output.  Synopsis:
 
 @example
-cat [@var{option}] [@var{file}]@dots{}
+cat [@var{option}]@dots{} [@var{file}]@dots{}
 @end example
 
 The program accepts the following options.  Also see @ref{Common options}.
@@ -3327,7 +3327,7 @@ sections of @var{input}  (standard input if none is given or @var{input}
 is @samp{-}).  Synopsis:
 
 @example
-split [@var{option}] [@var{input} [@var{prefix}]]
+split [@var{option}]@dots{} [@var{input} [@var{prefix}]]
 @end example
 
 By default, @command{split} puts 1000 lines of @var{input} (or whatever is
@@ -11262,7 +11262,7 @@ Print a message for each created directory.  This is most useful with
 specified names.  Synopsis:
 
 @example
-mkfifo [@var{option}] @var{name}@dots{}
+mkfifo [@var{option}]@dots{} @var{name}@dots{}
 @end example
 
 A @dfn{FIFO} is a special file type that permits independent processes
@@ -16260,7 +16260,7 @@ should not rely on its existence on non-POSIX platforms.
 Synopsis:
 
 @example
-@command{who} [@var{option}] [@var{file}] [am i]
+who [@var{option}]@dots{} [@var{file}] [am i]
 @end example
 
 @cindex terminal lines, currently used
@@ -16410,7 +16410,7 @@ should not rely on its existence on non-POSIX platforms.
 Synopsis:
 
 @example
-@command{pinky} [@var{option}] [@var{username}]@dots{}
+pinky [@var{option}]@dots{} [@var{username}]@dots{}
 @end example
 
 The program accepts the following options.  Also see @ref{Common options}.
@@ -17791,8 +17791,7 @@ with systems where this is allowed for non-privileged users.}.
 Synopses:
 
 @example
-chroot @var{option} @var{newroot} [@var{command} [@var{args}]@dots{}]
-chroot @var{option}
+chroot [@var{option}]@dots{} @var{newroot} [@var{command} [@var{args}]@dots{}]
 @end example
 
 Ordinarily, file names are looked up starting at the root of the
@@ -18829,7 +18828,7 @@ the exit status of @var{command} otherwise
 still running after the specified time interval.  Synopsis:
 
 @example
-timeout [@var{option}] @var{duration} @var{command} [@var{arg}]@dots{}
+timeout [@var{option}]@dots{} @var{duration} @var{command} [@var{arg}]@dots{}
 @end example
 
 @var{command} must not be a special built-in utility (@pxref{Special
index 970a2321ee3d290c5bbbf5f387c9bb7abf97f0b5..ca0677b0168dc335ce909dae128cb26df3a4ad7c 100644 (file)
@@ -184,9 +184,7 @@ usage (int status)
   else
     {
       printf (_("\
-Usage: %s [OPTION] NEWROOT [COMMAND [ARG]...]\n\
-  or:  %s OPTION\n\
-"), program_name, program_name);
+Usage: %s [OPTION]... NEWROOT [COMMAND [ARG]...]\n"), program_name);
 
       fputs (_("\
 Run COMMAND with root directory set to NEWROOT.\n\
index bea99e992e34a7281cff602c56fa4927a056648b..e3d2f5de5ac4ca347c42905213d23078598885f9 100644 (file)
@@ -60,7 +60,7 @@ usage (int status)
   else
     {
       printf (_("\
-Usage: %s [OPTION]... [VARIABLE]...\n\
+Usage: %s [OPTION] [VARIABLE]...\n\
 Print the values of the specified environment VARIABLE(s).\n\
 If no VARIABLE is specified, print name and value pairs for them all.\n\
 \n\
index a73dd329703ec531137062e36c2298a1d575040d..b8df73b1f9ac306f584b5c36f1428b5647bbfc21 100644 (file)
@@ -254,8 +254,7 @@ usage (int status)
   else
     {
       printf (_("\
-Usage: %s [OPTION] DURATION COMMAND [ARG]...\n\
-  or:  %s [OPTION]\n"), program_name, program_name);
+Usage: %s [OPTION]... DURATION COMMAND [ARG]...\n"), program_name);
 
       fputs (_("\
 Start COMMAND, and kill it if still running after DURATION.\n\