From: Pádraig Brady Date: Tue, 3 Jun 2025 21:58:38 +0000 (+0100) Subject: doc: make command synopsis more consistent X-Git-Tag: v9.8~306 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=037b93106155c5e11681837305b541808fbdb9b5;p=thirdparty%2Fcoreutils.git doc: make command synopsis more consistent * 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 --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index d1c282f562..7556571d7d 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -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 diff --git a/src/chroot.c b/src/chroot.c index 970a2321ee..ca0677b016 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -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\ diff --git a/src/printenv.c b/src/printenv.c index bea99e992e..e3d2f5de5a 100644 --- a/src/printenv.c +++ b/src/printenv.c @@ -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\ diff --git a/src/timeout.c b/src/timeout.c index a73dd32970..b8df73b1f9 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -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\