mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
maint: define usage note about mandatory args centrally
Each program with at least one long option which is marked as 'required_argument' and which has also a short option for that option, should print a note about mandatory arguments. Define that well-known note centrally and use it rather than literal printf/fputs, and add it where it was missing. * src/system.h (emit_mandatory_arg_note): Add new function. * src/cp.c (usage): Use it rather than literal printf/fputs. * src/csplit.c, src/cut.c, src/date.c, src/df.c, src/du.c: * src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/install.c: * src/kill.c, src/ln.c, src/ls.c, src/mkdir.c, src/mkfifo.c: * src/mknod.c, src/mv.c, src/nl.c, src/od.c, src/paste.c: * src/pr.c, src/ptx.c, src/shred.c, src/shuf.c, src/sort.c: * src/split.c, src/stdbuf.c, src/tac.c, src/tail.c, src/timeout.c: * src/touch.c, src/truncate.c, src/unexpand.c, src/uniq.c: Likewise. * src/base64.c (usage): Add call of the above new function because at least one long option has a required argument. * src/basename.c, src/chcon.c, src/date.c, src/env.c: * src/nice.c, src/runcon.c, src/seq.c, src/stat.c, src/stty.c: Likewise.
This commit is contained in:
1 parent
f8afbb424c
commit
4eaadb4743
45 files changed
+155
-145
No files matched your search
+4
-1
@@ -60,7 +60,10 @@ usage (int status)
|
||||
printf (_("\
|
||||
Usage: %s [OPTION]... [FILE]\n\
|
||||
Base64 encode or decode FILE, or standard input, to standard output.\n\
|
||||
\n"), program_name);
|
||||
"), program_name);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-d, --decode decode data\n\
|
||||
-i, --ignore-garbage when decoding, ignore non-alphabet characters\n\
|
||||
|
||||
+2
-1
@@ -53,9 +53,10 @@ Usage: %s NAME [SUFFIX]\n\
|
||||
fputs (_("\
|
||||
Print NAME with any leading directory components removed.\n\
|
||||
If specified, also remove a trailing SUFFIX.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-a, --multiple support multiple arguments and treat each as a NAME\n\
|
||||
-s, --suffix=SUFFIX remove a trailing SUFFIX\n\
|
||||
|
||||
+3
-1
@@ -357,8 +357,10 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\
|
||||
fputs (_("\
|
||||
Change the security context of each FILE to CONTEXT.\n\
|
||||
With --reference, change the security context of each FILE to that of RFILE.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
--dereference affect the referent of each symbolic link (this is\n\
|
||||
the default), rather than the symbolic link itself\n\
|
||||
|
||||
@@ -161,11 +161,10 @@ Usage: %s [OPTION]... [-T] SOURCE DEST\n\
|
||||
program_name, program_name, program_name);
|
||||
fputs (_("\
|
||||
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-a, --archive same as -dR --preserve=all\n\
|
||||
--attributes-only don't copy the file data, just the attributes\n\
|
||||
|
||||
+3
-4
@@ -1455,11 +1455,10 @@ Usage: %s [OPTION]... FILE PATTERN...\n\
|
||||
fputs (_("\
|
||||
Output pieces of FILE separated by PATTERN(s) to files 'xx00', 'xx01', ...,\n\
|
||||
and output byte counts of each piece to standard output.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-b, --suffix-format=FORMAT use sprintf FORMAT instead of %02d\n\
|
||||
-f, --prefix=PREFIX use PREFIX instead of 'xx'\n\
|
||||
|
||||
@@ -192,11 +192,10 @@ Usage: %s OPTION... [FILE]...\n\
|
||||
program_name);
|
||||
fputs (_("\
|
||||
Print selected parts of lines from each FILE to standard output.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-b, --bytes=LIST select only these bytes\n\
|
||||
-c, --characters=LIST select only these characters\n\
|
||||
|
||||
+5
-1
@@ -127,7 +127,11 @@ Usage: %s [OPTION]... [+FORMAT]\n\
|
||||
program_name, program_name);
|
||||
fputs (_("\
|
||||
Display the current time in the given FORMAT, or set the system date.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-d, --date=STRING display time described by STRING, not 'now'\n\
|
||||
-f, --file=DATEFILE like --date once for each line of DATEFILE\n\
|
||||
-I[TIMESPEC], --iso-8601[=TIMESPEC] output date/time in ISO 8601 format.\n\
|
||||
|
||||
@@ -1175,11 +1175,10 @@ usage (int status)
|
||||
fputs (_("\
|
||||
Show information about the file system on which each FILE resides,\n\
|
||||
or all file systems by default.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-a, --all include dummy file systems\n\
|
||||
-B, --block-size=SIZE scale sizes by SIZE before printing them. E.g.,\n\
|
||||
|
||||
@@ -273,11 +273,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
"), program_name, program_name);
|
||||
fputs (_("\
|
||||
Summarize disk usage of each FILE, recursively for directories.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-a, --all write counts for all files, not just directories\n\
|
||||
--apparent-size print apparent sizes, rather than disk usage; although\
|
||||
|
||||
@@ -54,7 +54,11 @@ Usage: %s [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]\n"),
|
||||
program_name);
|
||||
fputs (_("\
|
||||
Set each NAME to VALUE in the environment and run COMMAND.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-i, --ignore-environment start with an empty environment\n\
|
||||
-0, --null end each output line with 0 byte rather than newline\n\
|
||||
-u, --unset=NAME remove variable from the environment\n\
|
||||
|
||||
+3
-4
@@ -107,11 +107,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
fputs (_("\
|
||||
Convert tabs in each FILE to spaces, writing to standard output.\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-i, --initial do not convert tabs after non blanks\n\
|
||||
-t, --tabs=NUMBER have tabs NUMBER characters apart, not 8\n\
|
||||
|
||||
@@ -271,11 +271,10 @@ usage (int status)
|
||||
fputs (_("\
|
||||
Reformat each paragraph in the FILE(s), writing to standard output.\n\
|
||||
The option -WIDTH is an abbreviated form of --width=DIGITS.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-c, --crown-margin preserve indentation of first two lines\n\
|
||||
-p, --prefix=STRING reformat only lines beginning with STRING,\n\
|
||||
|
||||
+3
-4
@@ -70,11 +70,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
fputs (_("\
|
||||
Wrap input lines in each FILE (standard input by default), writing to\n\
|
||||
standard output.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-b, --bytes count bytes rather than columns\n\
|
||||
-s, --spaces break at spaces\n\
|
||||
|
||||
+3
-4
@@ -110,11 +110,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
Print the first 10 lines of each FILE to standard output.\n\
|
||||
With more than one FILE, precede each with a header giving the file name.\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-c, --bytes=[-]K print the first K bytes of each file;\n\
|
||||
with the leading '-', print all but the last\n\
|
||||
|
||||
+3
-4
@@ -608,11 +608,10 @@ like yum(1) or apt-get(1).\n\
|
||||
In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to\n\
|
||||
the existing DIRECTORY, while setting permission modes and owner/group.\n\
|
||||
In the 4th form, create all components of the given DIRECTORY(ies).\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
--backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
-b like --backup but does not accept an argument\n\
|
||||
|
||||
+3
-4
@@ -81,11 +81,10 @@ Usage: %s [-s SIGNAL | -SIGNAL] PID...\n\
|
||||
program_name, program_name, program_name);
|
||||
fputs (_("\
|
||||
Send signals to processes, or list signals.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-s, --signal=SIGNAL, -SIGNAL\n\
|
||||
specify the name or number of the signal to be sent\n\
|
||||
|
||||
@@ -387,11 +387,10 @@ By default, each destination (name of new link) should not already exist.\n\
|
||||
When creating hard links, each TARGET must exist. Symbolic links\n\
|
||||
can hold arbitrary text; if later resolved, a relative link is\n\
|
||||
interpreted in relation to its parent directory.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
--backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
-b like --backup but does not accept an argument\n\
|
||||
|
||||
@@ -4721,11 +4721,10 @@ usage (int status)
|
||||
fputs (_("\
|
||||
List information about the FILEs (the current directory by default).\n\
|
||||
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-a, --all do not ignore entries starting with .\n\
|
||||
-A, --almost-all do not list implied . and ..\n\
|
||||
|
||||
+3
-4
@@ -56,11 +56,10 @@ usage (int status)
|
||||
printf (_("Usage: %s [OPTION]... DIRECTORY...\n"), program_name);
|
||||
fputs (_("\
|
||||
Create the DIRECTORY(ies), if they do not already exist.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask\n\
|
||||
-p, --parents no error if existing, make parent directories as needed\n\
|
||||
|
||||
+3
-4
@@ -51,11 +51,10 @@ usage (int status)
|
||||
printf (_("Usage: %s [OPTION]... NAME...\n"), program_name);
|
||||
fputs (_("\
|
||||
Create named pipes (FIFOs) with the given NAMEs.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-m, --mode=MODE set file permission bits to MODE, not a=rw - umask\n\
|
||||
"), stdout);
|
||||
|
||||
+3
-4
@@ -53,11 +53,10 @@ usage (int status)
|
||||
program_name);
|
||||
fputs (_("\
|
||||
Create the special file NAME of the given TYPE.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-m, --mode=MODE set file permission bits to MODE, not a=rw - umask\n\
|
||||
"), stdout);
|
||||
|
||||
@@ -291,11 +291,10 @@ Usage: %s [OPTION]... [-T] SOURCE DEST\n\
|
||||
program_name, program_name, program_name);
|
||||
fputs (_("\
|
||||
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
--backup[=CONTROL] make a backup of each existing destination file\
|
||||
\n\
|
||||
|
||||
+6
-2
@@ -74,10 +74,14 @@ usage (int status)
|
||||
Run COMMAND with an adjusted niceness, which affects process scheduling.\n\
|
||||
With no COMMAND, print the current niceness. Niceness values range from\n\
|
||||
%d (most favorable to the process) to %d (least favorable to the process).\n\
|
||||
\n\
|
||||
-n, --adjustment=N add integer N to the niceness (default 10)\n\
|
||||
"),
|
||||
- NZERO, NZERO - 1);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-n, --adjustment=N add integer N to the niceness (default 10)\n\
|
||||
"), stdout);
|
||||
fputs (HELP_OPTION_DESCRIPTION, stdout);
|
||||
fputs (VERSION_OPTION_DESCRIPTION, stdout);
|
||||
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
|
||||
|
||||
@@ -179,11 +179,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
fputs (_("\
|
||||
Write each FILE to standard output, with line numbers added.\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-b, --body-numbering=STYLE use STYLE for numbering body lines\n\
|
||||
-d, --section-delimiter=CC use CC for separating logical pages\n\
|
||||
|
||||
@@ -311,11 +311,10 @@ An OFFSET operand means -j OFFSET. LABEL is the pseudo-address\n\
|
||||
at first byte printed, incremented when dump is progressing.\n\
|
||||
For OFFSET and LABEL, a 0x or 0X prefix indicates hexadecimal;\n\
|
||||
suffixes may be . for octal and b for multiply by 512.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-A, --address-radix=RADIX output format for file offsets. RADIX is one\n\
|
||||
of [doxn], for Decimal, Octal, Hex or None\n\
|
||||
|
||||
+3
-4
@@ -440,11 +440,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
Write lines consisting of the sequentially corresponding lines from\n\
|
||||
each FILE, separated by TABs, to standard output.\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-d, --delimiters=LIST reuse characters from LIST instead of TABs\n\
|
||||
-s, --serial paste one file at a time instead of in parallel\n\
|
||||
|
||||
@@ -2756,11 +2756,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
|
||||
fputs (_("\
|
||||
Paginate or columnate FILE(s) for printing.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
+FIRST_PAGE[:LAST_PAGE], --pages=FIRST_PAGE[:LAST_PAGE]\n\
|
||||
begin [stop] printing with page FIRST_[LAST_]PAGE\n\
|
||||
|
||||
@@ -1820,11 +1820,10 @@ Usage: %s [OPTION]... [INPUT]... (without -G)\n\
|
||||
program_name, program_name);
|
||||
fputs (_("\
|
||||
Output a permuted index, including context, of the words in the input files.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-A, --auto-reference output automatically generated references\n\
|
||||
-G, --traditional behave more like System V 'ptx'\n\
|
||||
|
||||
+5
-1
@@ -87,7 +87,11 @@ Usage: %s CONTEXT COMMAND [args]\n\
|
||||
fputs (_("\
|
||||
Run a program in a different security context.\n\
|
||||
With neither CONTEXT nor COMMAND, print the current security context.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
CONTEXT Complete security context\n\
|
||||
-c, --compute compute process transition context before modifying\n\
|
||||
-t, --type=TYPE type (for same role as parent)\n\
|
||||
|
||||
@@ -72,7 +72,11 @@ Usage: %s [OPTION]... LAST\n\
|
||||
"), program_name, program_name, program_name);
|
||||
fputs (_("\
|
||||
Print numbers from FIRST to LAST, in steps of INCREMENT.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-f, --format=FORMAT use printf style floating-point FORMAT\n\
|
||||
-s, --separator=STRING use STRING to separate numbers (default: \\n)\n\
|
||||
-w, --equal-width equalize width by padding with leading zeroes\n\
|
||||
|
||||
+3
-4
@@ -148,11 +148,10 @@ usage (int status)
|
||||
fputs (_("\
|
||||
Overwrite the specified FILE(s) repeatedly, in order to make it harder\n\
|
||||
for even very expensive hardware probing to recover the data.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
printf (_("\
|
||||
-f, --force change permissions to allow writing if necessary\n\
|
||||
-n, --iterations=N overwrite N times instead of the default (%d)\n\
|
||||
|
||||
+3
-4
@@ -53,11 +53,10 @@ Usage: %s [OPTION]... [FILE]\n\
|
||||
program_name, program_name, program_name);
|
||||
fputs (_("\
|
||||
Write a random permutation of the input lines to standard output.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-e, --echo treat each ARG as an input line\n\
|
||||
-i, --input-range=LO-HI treat each number LO through HI as an input line\n\
|
||||
|
||||
+3
-4
@@ -398,11 +398,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
program_name, program_name);
|
||||
fputs (_("\
|
||||
Write sorted concatenation of all FILE(s) to standard output.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
Ordering options:\n\
|
||||
\n\
|
||||
|
||||
+3
-4
@@ -209,11 +209,10 @@ Usage: %s [OPTION]... [INPUT [PREFIX]]\n\
|
||||
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default\n\
|
||||
size is 1000 lines, and default PREFIX is 'x'. With no INPUT, or when INPUT\n\
|
||||
is -, read standard input.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fprintf (stdout, _("\
|
||||
-a, --suffix-length=N generate suffixes of length N (default %d)\n\
|
||||
--additional-suffix=SUFFIX append an additional SUFFIX to file names.\n\
|
||||
|
||||
+5
-1
@@ -1349,7 +1349,11 @@ usage (int status)
|
||||
printf (_("Usage: %s [OPTION]... FILE...\n"), program_name);
|
||||
fputs (_("\
|
||||
Display file or file system status.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-L, --dereference follow links\n\
|
||||
-f, --file-system display file system status instead of file status\n\
|
||||
"), stdout);
|
||||
|
||||
+3
-4
@@ -90,11 +90,10 @@ usage (int status)
|
||||
printf (_("Usage: %s OPTION... COMMAND\n"), program_name);
|
||||
fputs (_("\
|
||||
Run COMMAND, with modified buffering operations for its standard streams.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-i, --input=MODE adjust standard input stream buffering\n\
|
||||
-o, --output=MODE adjust standard output stream buffering\n\
|
||||
|
||||
+5
-1
@@ -515,7 +515,11 @@ Usage: %s [-F DEVICE | --file=DEVICE] [SETTING]...\n\
|
||||
program_name, program_name, program_name);
|
||||
fputs (_("\
|
||||
Print or change terminal characteristics.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-a, --all print all current settings in human-readable form\n\
|
||||
-g, --save print all current settings in a stty-readable form\n\
|
||||
-F, --file=DEVICE open and use the specified DEVICE instead of stdin\n\
|
||||
|
||||
@@ -538,6 +538,14 @@ is_nul (const char *buf, size_t bufsize)
|
||||
? false : (((Accum) = (Accum) * 10 + (Digit_val)), true)) \
|
||||
)
|
||||
|
||||
static inline void
|
||||
emit_mandatory_arg_note (void)
|
||||
{
|
||||
fputs (_("\n\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
}
|
||||
|
||||
static inline void
|
||||
emit_size_note (void)
|
||||
{
|
||||
|
||||
@@ -137,11 +137,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
fputs (_("\
|
||||
Write each FILE to standard output, last line first.\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-b, --before attach the separator before instead of after\n\
|
||||
-r, --regex interpret the separator as a regular expression\n\
|
||||
|
||||
+3
-4
@@ -263,11 +263,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
Print the last %d lines of each FILE to standard output.\n\
|
||||
With more than one FILE, precede each with a header giving the file name.\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n\
|
||||
\n\
|
||||
"), DEFAULT_N_LINES);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-c, --bytes=K output the last K bytes; alternatively, use -c +K\n\
|
||||
to output bytes starting with the Kth of each file\n\
|
||||
|
||||
+3
-2
@@ -213,9 +213,10 @@ Usage: %s [OPTION] DURATION COMMAND [ARG]...\n\
|
||||
|
||||
fputs (_("\
|
||||
Start COMMAND, and kill it if still running after DURATION.\n\
|
||||
\n\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
--preserve-status\n\
|
||||
exit with the same status as COMMAND, even when the\n\
|
||||
|
||||
+3
-4
@@ -218,11 +218,10 @@ is supplied.\n\
|
||||
\n\
|
||||
A FILE argument string of - is handled specially and causes touch to\n\
|
||||
change the times of the file associated with standard output.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-a change only the access time\n\
|
||||
-c, --no-create do not create any files\n\
|
||||
|
||||
+3
-4
@@ -102,11 +102,10 @@ A FILE argument that does not exist is created.\n\
|
||||
If a FILE is larger than the specified size, the extra data is lost.\n\
|
||||
If a FILE is shorter, it is extended and the extended part (hole)\n\
|
||||
reads as zero bytes.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-c, --no-create do not create any files\n\
|
||||
"), stdout);
|
||||
|
||||
+3
-4
@@ -117,11 +117,10 @@ Usage: %s [OPTION]... [FILE]...\n\
|
||||
fputs (_("\
|
||||
Convert blanks in each FILE to tabs, writing to standard output.\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-a, --all convert all blanks, instead of just initial blanks\n\
|
||||
--first-only convert only leading sequences of blanks (overrides -a)\n\
|
||||
|
||||
+3
-4
@@ -140,11 +140,10 @@ Filter adjacent matching lines from INPUT (or standard input),\n\
|
||||
writing to OUTPUT (or standard output).\n\
|
||||
\n\
|
||||
With no options, matching lines are merged to the first occurrence.\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
|
||||
emit_mandatory_arg_note ();
|
||||
|
||||
fputs (_("\
|
||||
-c, --count prefix lines by the number of occurrences\n\
|
||||
-d, --repeated only print duplicate lines\n\
|
||||
|
||||
Reference in new issue
Block a user