]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Split usage strings so that --help and --version
authorJim Meyering <jim@meyering.net>
Fri, 23 Nov 2001 20:10:25 +0000 (20:10 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 23 Nov 2001 20:10:25 +0000 (20:10 +0000)
descriptions are alone in their own string.

17 files changed:
src/chgrp.c
src/chmod.c
src/chown.c
src/cp.c
src/dd.c
src/dircolors.c
src/install.c
src/ln.c
src/ls.c
src/mkdir.c
src/mkfifo.c
src/mknod.c
src/mv.c
src/rm.c
src/rmdir.c
src/shred.c
src/sync.c

index a090b83a5ee9919c0aa0653e4d6ed4144fdb40ab..46fe034143df1ff1cd7744bfe5e3b67136e50cd3 100644 (file)
@@ -145,9 +145,9 @@ Change the group membership of each FILE to GROUP.\n\
       --reference=RFILE  use RFILE's group rather than the specified\n\
                          GROUP value\n\
   -R, --recursive        operate on files and directories recursively\n\
+  -v, --verbose          output a diagnostic for every file processed\n\
 "), stdout);
       fputs (_("\
-  -v, --verbose          output a diagnostic for every file processed\n\
       --help             display this help and exit\n\
       --version          output version information and exit\n\
 "), stdout);
index 371f4cccc93567ca77dbc07a535768ac5fa6c88f..953bb79590954b92e42b238fa9ffed0db2fa5b4b 100644 (file)
@@ -253,11 +253,13 @@ Change the mode of each FILE to MODE.\n\
   -f, --silent, --quiet   suppress most error messages\n\
   -v, --verbose           output a diagnostic for every file processed\n\
       --reference=RFILE   use RFILE's mode instead of MODE values\n\
+  -R, --recursive         change files and directories recursively\n\
 "), stdout);
       fputs (_("\
-  -R, --recursive         change files and directories recursively\n\
       --help              display this help and exit\n\
       --version           output version information and exit\n\
+"), stdout);
+      fputs (_("\
 \n\
 Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n\
 one or more of the letters rwxXstugo.\n\
index 6d92888ba4017ae5cd086d7f72d7372934483a61..ce81ace3122b784975e90c8a2e590207bc7ad0f1 100644 (file)
@@ -126,14 +126,14 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\
       --reference=RFILE  use RFILE's owner and group rather than\n\
                          the specified OWNER:GROUP values\n\
   -R, --recursive        operate on files and directories recursively\n\
+  -v, --verbose          output a diagnostic for every file processed\n\
 "), stdout);
       fputs (_("\
-  -v, --verbose          output a diagnostic for every file processed\n\
       --help             display this help and exit\n\
       --version          output version information and exit\n\
-\n\
 "), stdout);
       fputs (_("\
+\n\
 Owner is unchanged if missing.  Group is unchanged if missing, but changed\n\
 to login group if implied by a `:'.  OWNER and GROUP may be numeric as well\n\
 as symbolic.\n\
index 74834f2760b1b85258a6a4905b43c6ab5ddebef1..13974474322c87819f54258f82ab4cc374073306 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -212,18 +212,20 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
   -s, --symbolic-link          make symbolic links instead of copying\n\
   -S, --suffix=SUFFIX          override the usual backup suffix\n\
       --target-directory=DIRECTORY  move all SOURCE arguments into DIRECTORY\n\
+"), stdout);
+      fputs (_("\
   -u, --update                 copy only when the SOURCE file is newer\n\
                                  than the destination file or when the\n\
                                  destination file is missing\n\
-"), stdout);
-      fputs (_("\
   -v, --verbose                explain what is being done\n\
   -x, --one-file-system        stay on this file system\n\
+"), stdout);
+      fputs (_("\
       --help                   display this help and exit\n\
       --version                output version information and exit\n\
-\n\
 "), stdout);
       fputs (_("\
+\n\
 By default, sparse SOURCE files are detected by a crude heuristic and the\n\
 corresponding DEST file is made sparse as well.  That is the behavior\n\
 selected by --sparse=auto.  Specify --sparse=always to create a sparse DEST\n\
index 6ddcad1e64115861dd3852eb8ddfa2c84e69851a..47d5f0370fb92393da2ff278723ff4981236e60f 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -304,6 +304,8 @@ Copy a file, converting and formatting according to the options.\n\
   of=FILE         write to FILE instead of stdout\n\
   seek=BLOCKS     skip BLOCKS obs-sized blocks at start of output\n\
   skip=BLOCKS     skip BLOCKS ibs-sized blocks at start of input\n\
+"), stdout);
+      fputs (_("\
       --help      display this help and exit\n\
       --version   output version information and exit\n\
 "), stdout);
index 796e667eae4675f955c41c7ef96ce703b592df46..9b0745f6abc51877b131b4afd866e56a5f2882f9 100644 (file)
@@ -113,6 +113,8 @@ Determine format of output:\n\
       fputs (_("\
       --help                  display this help and exit\n\
       --version               output version information and exit\n\
+"), stdout);
+      fputs (_("\
 \n\
 If FILE is specified, read it to determine which colors to use for which\n\
 file types and extensions.  Otherwise, a precompiled database is used.\n\
index 842ded2be6a26b2ddf18f86d33240dbd1506283c..a7f588f045c663706b83f0172ff0c1b9b2edaabc 100644 (file)
@@ -629,14 +629,14 @@ In the third format, create all components of the given DIRECTORY(ies).\n\
                         to corresponding destination files\n\
   -s, --strip         strip symbol tables, only for 1st and 2nd formats\n\
   -S, --suffix=SUFFIX override the usual backup suffix\n\
+  -v, --verbose       print the name of each directory as it is created\n\
 "), stdout);
       fputs (_("\
-  -v, --verbose       print the name of each directory as it is created\n\
       --help          display this help and exit\n\
       --version       output version information and exit\n\
-\n\
 "), stdout);
       fputs (_("\
+\n\
 The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\
 The version control method may be selected via the --backup option or through\n\
 the VERSION_CONTROL environment variable.  Here are the values:\n\
index fe037a19a28809e833a2f8fe3541e009354fa8a5..b8b628dc756dee31f739c6037d83dfa8aef05ff6 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
@@ -362,17 +362,19 @@ links with --symbolic.  When creating hard links, each TARGET must exist.\n\
                                 directory as if it were a normal file\n\
   -i, --interactive           prompt whether to remove destinations\n\
   -s, --symbolic              make symbolic links instead of hard links\n\
-  -S, --suffix=SUFFIX         override the usual backup suffix\n\
 "), stdout);
       fputs (_("\
+  -S, --suffix=SUFFIX         override the usual backup suffix\n\
       --target-directory=DIRECTORY  specify the DIRECTORY in which to create\n\
                                 the links\n\
   -v, --verbose               print name of each file before linking\n\
+"), stdout);
+      fputs (_("\
       --help                  display this help and exit\n\
       --version               output version information and exit\n\
-\n\
 "), stdout);
       fputs (_("\
+\n\
 The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\
 The version control method may be selected via the --backup option or through\n\
 the VERSION_CONTROL environment variable.  Here are the values:\n\
index 150f784ed4f7430574e55f635454852ce4c51647..2a332c15c7123209b39350c6a1fcfdb52b79ca34 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -3659,6 +3659,8 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
   -x                         list entries by lines instead of by columns\n\
   -X                         sort alphabetically by entry extension\n\
   -1                         list one file per line\n\
+"), stdout);
+      fputs (_("\
       --help                 display this help and exit\n\
       --version              output version information and exit\n\
 "), stdout);
index 549bdadde894c3776a99ef2e52219c388dba716d..57a11423e7453a14e59b48506dd14de9d2671392 100644 (file)
@@ -59,15 +59,17 @@ usage (int status)
   else
     {
       printf (_("Usage: %s [OPTION] DIRECTORY...\n"), program_name);
-      printf (_("\
+      fputs (_("\
 Create the DIRECTORY(ies), if they do not already exist.\n\
 \n\
   -m, --mode=MODE   set permission mode (as in chmod), not rwxrwxrwx - umask\n\
   -p, --parents     no error if existing, make parent directories as needed\n\
   -v, --verbose     print a message for each created directory\n\
+"), stdout);
+      fputs (_("\
       --help        display this help and exit\n\
       --version     output version information and exit\n\
-"));
+"), stdout);
       puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 341be8a51d931cc4d39bb89536d480589cc68263..ca70a11caf98d79b110cdf4706edfa13b96eb872 100644 (file)
@@ -53,13 +53,15 @@ usage (int status)
   else
     {
       printf (_("Usage: %s [OPTION] NAME...\n"), program_name);
-      printf (_("\
+      fputs (_("\
 Create named pipes (FIFOs) with the given NAMEs.\n\
 \n\
   -m, --mode=MODE   set permission mode (as in chmod), not a=rw - umask\n\
+"), stdout);
+      fputs (_("\
       --help        display this help and exit\n\
       --version     output version information and exit\n\
-"));
+"), stdout);
       puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 47c1f8d44e6718572131c96247e0ed3f55d86676..fb005bb9552a89b4ede2dd210fd2f4511f5bc857 100644 (file)
@@ -63,19 +63,23 @@ usage (int status)
   else
     {
       printf (_("Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n"), program_name);
-      printf (_("\
+      fputs (_("\
 Create the special file NAME of the given TYPE.\n\
 \n\
   -m, --mode=MODE   set permission mode (as in chmod), not a=rw - umask\n\
+"), stdout);
+      fputs (_("\
       --help        display this help and exit\n\
       --version     output version information and exit\n\
+"), stdout);
+      fputs (_("\
 \n\
 MAJOR MINOR are forbidden for TYPE p, mandatory otherwise.  TYPE may be:\n\
 \n\
   b      create a block (buffered) special file\n\
   c, u   create a character (unbuffered) special file\n\
   p      create a FIFO\n\
-"));
+"), stdout);
       puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
     }
   exit (status);
index 5d1ebe1766721cde1145120b60c2475d3bdea191..be29d622b6b98b347a409541ac107454ba23e73d 100644 (file)
--- a/src/mv.c
+++ b/src/mv.c
@@ -333,7 +333,7 @@ Usage: %s [OPTION]... SOURCE DEST\n\
   or:  %s [OPTION]... --target-directory=DIRECTORY SOURCE...\n\
 "),
              program_name, program_name, program_name);
-      printf (_("\
+      fputs (_("\
 Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
 \n\
       --backup[=CONTROL]       make a backup of each existing destination file\n\
@@ -342,34 +342,38 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
                                  equivalent to --reply=yes\n\
   -i, --interactive            prompt before overwrite\n\
                                  equivalent to --reply=query\n\
-"));
-      printf (_("\
+"), stdout);
+      fputs (_("\
       --reply={yes,no,query}   specify how to handle the prompt about an\n\
                                  existing destination file\n\
       --strip-trailing-slashes remove any trailing slashes from each SOURCE\n\
                                  argument\n\
   -S, --suffix=SUFFIX          override the usual backup suffix\n\
-"));
-      printf (_("\
+"), stdout);
+      fputs (_("\
       --target-directory=DIRECTORY  move all SOURCE arguments into DIRECTORY\n\
   -u, --update                 move only when the SOURCE file is newer\n\
                                  than the destination file or when the\n\
                                  destination file is missing\n\
   -v, --verbose                explain what is being done\n\
+"), stdout);
+      fputs (_("\
       --help                   display this help and exit\n\
       --version                output version information and exit\n\
 \n\
-"));
-      printf (_("\
+"), stdout);
+      fputs (_("\
 The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\
 The version control method may be selected via the --backup option or through\n\
 the VERSION_CONTROL environment variable.  Here are the values:\n\
 \n\
+"), stdout);
+      fputs (_("\
   none, off       never make backups (even if --backup is given)\n\
   numbered, t     make numbered backups\n\
   existing, nil   numbered if numbered backups exist, simple otherwise\n\
   simple, never   always make simple backups\n\
-"));
+"), stdout);
       puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
     }
   exit (status);
index dbe6fb26fc86aa8f08751ac39b4dd1a546bf4a52..a3f214b66bde7267645fb4890b661ea22948feeb 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -92,14 +92,14 @@ Remove (unlink) the FILE(s).\n\
   -f, --force           ignore nonexistent files, never prompt\n\
   -i, --interactive     prompt before any removal\n\
   -r, -R, --recursive   remove the contents of directories recursively\n\
+  -v, --verbose         explain what is being done\n\
 "), stdout);
       fputs (_("\
-  -v, --verbose         explain what is being done\n\
       --help            display this help and exit\n\
       --version         output version information and exit\n\
-\n\
 "), stdout);
       printf (_("\
+\n\
 To remove a file whose name starts with a `-', for example `-foo',\n\
 use one of these commands:\n\
   %s -- -foo\n\
index 085a11e68dca6e95cc39f3eb2a4278ede35baf00..8276816a6a0ec19c6b5a0b1fbd7a6612719936d8 100644 (file)
@@ -148,12 +148,14 @@ Remove the DIRECTORY(ies), if they are empty.\n\
       --ignore-fail-on-non-empty\n\
                   ignore each failure that is solely because a directory\n\
                   is non-empty\n\
+"), stdout);
+      fputs (_("\
   -p, --parents   remove DIRECTORY, then try to remove each directory\n\
                   component of that path name.  E.g., `rmdir -p a/b/c' is\n\
                   similar to `rmdir a/b/c a/b a'.\n\
+  -v, --verbose   output a diagnostic for every directory processed\n\
 "), stdout);
       fputs (_("\
-  -v, --verbose   output a diagnostic for every directory processed\n\
       --help      display this help and exit\n\
       --version   output version information and exit\n\
 "), stdout);
index 9bec7dd13939993a6aba4d2d0c63fc2068e3678e..2e1fed47655ee56da4943da3f9b7dc80112ab1d8 100644 (file)
@@ -478,11 +478,13 @@ for even very expensive hardware probing to recover the data.\n\
   -x, --exact    do not round file sizes up to the next full block\n\
   -z, --zero     add a final overwrite with zeros to hide shredding\n\
   -              shred standard output\n\
+"), stdout);
+      fputs (_("\
       --help     display this help and exit\n\
       --version  print version information and exit\n\
-\n\
 "), stdout);
       fputs (_("\
+\n\
 Delete FILE(s) if --remove (-u) is specified.  The default is not to remove\n\
 the files because it is common to operate on device files like /dev/hda,\n\
 and those files usually should not be removed.  When operating on regular\n\
index 1afc5d927677824ebb9d3f72076eb1bfbb9ddba9..dcade1c8e38471b0c3c8c0cbd2a4d4c10798a9bc 100644 (file)
@@ -42,12 +42,14 @@ usage (int status)
   else
     {
       printf (_("Usage: %s [OPTION]\n"), program_name);
-      printf (_("\
+      fputs (_("\
 Force changed blocks to disk, update the super block.\n\
 \n\
+"), stdout);
+      fputs (_("\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
-"));
+"), stdout);
       puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
     }
   exit (status);