]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(usage): Add one- and two-line descriptions to --help output.
authorJim Meyering <jim@meyering.net>
Mon, 15 May 1995 04:53:56 +0000 (04:53 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 15 May 1995 04:53:56 +0000 (04:53 +0000)
From Karl.

25 files changed:
src/basename.c
src/date.c
src/dirname.c
src/echo.c
src/env.c
src/expr.c
src/hostname.c
src/id.c
src/logname.c
src/nice.c
src/nohup.sh
src/pathchk.c
src/printenv.c
src/printf.c
src/pwd.c
src/sleep.c
src/stty.c
src/su.c
src/tee.c
src/test.c
src/tty.c
src/uname.c
src/who.c
src/whoami.c
src/yes.c

index 0bcc2fe2955d9d0677e9262826c6065c5580c520..b16cf3ce46e9f0b51df4eed516835eded8bf8a82 100644 (file)
@@ -52,11 +52,13 @@ usage (status)
   else
     {
       printf ("\
-Usage: %s PATH [SUFFIX]\n\
+Usage: %s NAME [SUFFIX]\n\
   or:  %s OPTION\n\
 ",
              program_name, program_name);
       printf ("\
+Print NAME with any leading directory components removed.\n\
+If specified, also remove a trailing SUFFIX.\n\
 \n\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
index 06da60393f9d10ffad5ff8cf4a861bad042348cc..d6980d1e28593fcb8dccf98d6ffc1449788f464f 100644 (file)
@@ -333,6 +333,7 @@ Usage: %s [OPTION]... [+FORMAT]\n\
 ",
              program_name, program_name);
       printf ("\
+Display the current time in the given FORMAT, or set the system date.\n\
 \n\
   -d, --date=STRING        display time described by STRING, not `now'\n\
   -f, --file=DATEFILE      like --date once for each line of DATEFILE\n\
index e8a0547a8cc12b44de2d993fc8311b67eb244aa6..4386a8744732f2b09c9a56ea913d605cf6c5929b 100644 (file)
@@ -41,11 +41,13 @@ usage (status)
   else
     {
       printf ("\
-Usage: %s PATH\n\
+Usage: %s NAME\n\
   or:  %s OPTION\n\
 ",
              program_name, program_name);
       printf ("\
+Print NAME with its trailing /component removed; if NAME contains no /'s,\n\
+output `.' (meaning the current directory).\n\
 \n\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
index 8ba3e83bb6db12986988bb2a1e4a1a34f67da5a3..eeafc723c17575e5536a1571669bbf19c59d9786 100644 (file)
@@ -74,6 +74,7 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... [STRING]...\n", program_name);
       printf ("\
+Echo the STRING(s) to standard output.\n\
 \n\
   -n              do not output the trailing newline\n\
   -e              (unused)\n\
index 3b75ddce2a97dd2ca9fa1609b9157a2f34f474bd..6537a3c76bf1a7715369b35b25a9622d13b581f6 100644 (file)
--- a/src/env.c
+++ b/src/env.c
@@ -193,6 +193,7 @@ usage (status)
       printf ("Usage: %s [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]\n",
              program_name);
       printf ("\
+Set each NAME to VALUE in the environment and run COMMAND.\n\
 \n\
   -u, --unset=NAME           remove variable from the environment\n\
   -i, --ignore-environment   start with an empty environment\n\
index 93d240a144d4680f655b0e01e26e9d08c7707558..95aba88de1bc4b21b09fc6a10d88f785c518b6ba 100644 (file)
@@ -109,7 +109,7 @@ Usage: %s EXPRESSION\n\
 \n\
 ");
       printf ("\
-EXPRESSION value is written on standard output.  A white line\n\
+Print the value of EXPRESSION to standard output.  A blank line below\n\
 separates increasing precedence groups.  EXPRESSION may be:\n\
 \n\
   ARG1 | ARG2       ARG1 if it is neither null nor 0, otherwise ARG2\n\
@@ -141,7 +141,7 @@ separates increasing precedence groups.  EXPRESSION may be:\n\
 ");
       printf ("\
 \n\
-Beware that some operators need to be escaped by backslashes for shells.\n\
+Beware that many operators need to be escaped or quoted for shells.\n\
 Comparisons are arithmetic if both ARGs are numbers, else lexicographical.\n\
 Pattern matches return the string matched between \\( and \\) or null; if\n\
 \\( and \\) are not used, they return the number of characters matched or 0.\n\
index f4ccbd83da2a23bfb63c097b11f24c0a21d8e3e6..ef89bb370c6c72325bb92f1811633ef4e34874be 100644 (file)
@@ -64,6 +64,7 @@ usage (status)
       printf ("\
 Usage: %s [NAME]\n\
   or:  %s OPTION\n\
+Print the hostname of the current system.\n\
 \n\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
index 569b3384b4d765c85eb0c2567fe3ba321451a862..1d04944a1e6dba5452e6a098fc1f084a0cd45bb3 100644 (file)
--- a/src/id.c
+++ b/src/id.c
@@ -361,6 +361,7 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... [USERNAME]\n", program_name);
       printf ("\
+Print information for USERNAME, or the current user.\n\
 \n\
   -g, --group     print only the group ID\n\
   -G, --groups    print only the supplementary groups\n\
index 6062581a0d2f3308317ea33911a0be5154a25ac2..916a9896e3c10eaa9e528171554ba707b236ff2b 100644 (file)
@@ -50,6 +50,7 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]...\n", program_name);
       printf ("\
+Print the name of the current user.\n\
 \n\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
index 6f808033437b6c94d38d90cc371de9638a79bf3c..337c4137b8cc61cc6bf669d4cb5efcdbd4c079fe 100644 (file)
@@ -191,15 +191,14 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... [COMMAND [ARG]...]\n", program_name);
       printf ("\
+Run COMMAND with an adjusted scheduling priority.\n\
+With no COMMAND, print the current scheduling priority.  ADJUST is 10\n\
+by default.  Range goes from -20 (highest priority) to 19 (lowest).\n\
 \n\
   -ADJUST                   increment priority by ADJUST first\n\
   -n, --adjustment=ADJUST   same as -ADJUST\n\
       --help                display this help and exit\n\
-      --version             output version information and exit\n\
-\n\
-With no COMMAND, print the current scheduling priority.  ADJUST is 10\n\
-by default.  Range goes from -20 (highest priority) to 19 (lowest).\n\
-");
+      --version             output version information and exit\n");
     }
   exit (status);
 }
index 87f864d41340411e3422e0731a67ed8dba5fc439..0d171e8a17422b46431a29bdee8856f650ac6c9a 100755 (executable)
@@ -28,7 +28,8 @@ usage="Usage: $0 COMMAND [ARG]...
 usage_try="
 Try \`$0 --help' for more information."
 
-usage_help="
+usage_help="Run COMMAND, ignoring hangup signals.
+
   --help      display this help and exit
   --version   output version information and exit"
 
index c1458f833f3851d6aa5e49011bf40722a7d656fa..fecd610db74f113581f251c2292915520658ea40 100644 (file)
@@ -364,8 +364,9 @@ usage (status)
             program_name);
   else
     {
-      printf ("Usage: %s [OPTION]... PATH...\n", program_name);
+      printf ("Usage: %s [OPTION]... NAME...\n", program_name);
       printf ("\
+Diagnose unportable constructs in NAME.\n\
 \n\
   -p, --portability   check for all POSIX systems, not only this one\n\
       --help          display this help and exit\n\
index 6b248c325be1f8549463d818045c6d42120ebb83..1786f9f351058df2f82c94c97f669733b18c023a 100644 (file)
@@ -65,12 +65,10 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... [VARIABLE]...\n", program_name);
       printf ("\
+If no environment VARIABLE specified, print them all.\n\
 \n\
   --help      display this help and exit\n\
-  --version   output version information and exit\n\
-\n\
-If no VARIABLE, print them all.\n\
-");
+  --version   output version information and exit\n");
     }
   exit (status);
 }
index dc55c41d6ae0e622bc4685fd07e472d76c6fd207..63e40e508441120eed3b73697a0f5c0b2563ba93 100644 (file)
@@ -96,6 +96,7 @@ Usage: %s FORMAT [ARGUMENT]...\n\
 ",
              program_name, program_name);
       printf ("\
+Print ARGUMENT(s) according to FORMAT.\n\
 \n\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
index 7af6beb0f71363d89355a4c96f93341b02b347f1..54c21ad5e01f02dd41916ff503a59ce34c2ef8dc 100644 (file)
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -42,6 +42,7 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]\n", program_name);
       printf ("\
+Print the full filename of the current working directory.\n\
 \n\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
index 01887c30fb40be9199168871286724584b057fd8..b590befb9ff0879508e0b8c448f857c77da11f0c 100644 (file)
@@ -53,12 +53,11 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... NUMBER[SUFFIX]\n", program_name);
       printf ("\
+Pause for NUMBER seconds.\n\
+SUFFIX may be s to keep seconds, m for minutes, h for hours or d for days.\n\
 \n\
   --help      display this help and exit\n\
-  --version   output version information and exit\n\
-\n\
-SUFFIX may be s for seconds, m for minutes, h for hours or d for days.\n\
-");
+  --version   output version information and exit\n");
     }
   exit (status);
 }
index 967e4289d2b471f5e3a6540189d7a836854ae79a..abfa34b25311554bb7921b36cd30d2066498b45b 100644 (file)
@@ -466,6 +466,7 @@ Usage: %s [SETTING]...\n\
 ",
              program_name, program_name);
       printf ("\
+Print or change terminal characteristics.\n\
 \n\
   -a, --all       print all current settings in human-readable form\n\
   -g, --save      print all current settings in a stty-readable form\n\
index 5ba724f41af23065f587e3ecbc92bdaf911f8092..a41706a308176d566bbc4341a69cd77a3b8e4a4b 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -575,8 +575,9 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... [-] [USER [ARG]...]\n", program_name);
       printf ("\
+Change the effective user id and group id to that of USER.\n\
 \n\
-  -l, --login                  make the shell a login shell\n\
+  -, -l, --login               make the shell a login shell\n\
   -c, --commmand=COMMAND       pass a single COMMAND to the shell with -c\n\
   -f, --fast                   pass -f to the shell (for csh or tcsh)\n\
   -m, --preserve-environment   do not reset environment variables\n\
index 9cd9118cd5c4e81f4743dd5cb40e9fb640103723..5554d154a9c60589acb9cdcee811a7f954101365 100644 (file)
--- a/src/tee.c
+++ b/src/tee.c
@@ -67,6 +67,7 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... [FILE]...\n", program_name);
       printf ("\
+Copy standard input to each FILE, and also to standard output.\n\
 \n\
   -a, --append              append to the given FILEs, do not overwrite\n\
   -i, --ignore-interrupts   ignore interrupt signals\n\
index ea2d5c58005e130177abd0cb39f38f47f7d4df90..2ba8585d5a6ef43486b9b202569fa8fcd935cd2f 100644 (file)
@@ -992,6 +992,7 @@ Usage: %s EXPRESSION\n\
 ",
              program_name, program_name);
       printf ("\
+Exit with the status determined by EXPRESSION.\n\
 \n\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
index 66ecb8776127324e5dfda2254c0592bc7fb7c711..68332a7c2e1554167af2ed9fd47b19652ecc5c88 100644 (file)
--- a/src/tty.c
+++ b/src/tty.c
@@ -119,6 +119,7 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]...\n", program_name);
       printf ("\
+Print the file name of the terminal connected to standard input.\n\
 \n\
   -s, --silent, --quiet   print nothing, only return an exit status\n\
       --help              display this help and exit\n\
index 4e55feebd57062624800c04520176982d44cf755..e1e9ed006170298697bfe592bbdf5ed691195233 100644 (file)
@@ -184,6 +184,7 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]...\n", program_name);
       printf ("\
+Print certain system information.  With no OPTION, same as -s.\n\
 \n\
   -a, --all        print all information\n\
   -m, --machine    print the machine (hardware) type\n\
@@ -192,10 +193,7 @@ usage (status)
   -s, --sysname    print the operating system name\n\
   -v               print the operating system version\n\
       --help       display this help and exit\n\
-      --version    output version information and exit\n\
-\n\
-Without any OPTION, assume -s.\n\
-");
+      --version    output version information and exit\n");
     }
   exit (status);
 }
index 659b848ac57fabfa7c774cccb7133eed805c7820..d10d014ea67c6e3bc74950f73e15bae08eaa3850 100644 (file)
--- a/src/who.c
+++ b/src/who.c
@@ -544,12 +544,11 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... [ FILE ]\n", program_name);
       printf ("\
+Output who is currently logged in according to FILE.\n\
+If FILE not given, uses /etc/utmp.  /etc/wtmp as FILE is common.\n\
 \n\
       --help        display this help and exit\n\
-      --version     output version information and exit\n\
-\n\
-If FILE not given, uses /etc/utmp.  /etc/wtmp as FILE is common.\n\
-");
+      --version     output version information and exit\n");
     }
   exit (status);
 }
index c2f25f0e8471270c2288c5b09cc07f6ba021c703..0b484799378c79c665697c86b2750673c74a5b2a 100644 (file)
@@ -54,12 +54,11 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]...\n", program_name);
       printf ("\
+Print the user name associated with the current effective user id.\n\
+Same as id -un.\n\
 \n\
   --help      display this help and exit\n\
-  --version   output version information and exit\n\
-\n\
-Same as id -un.\n\
-");
+  --version   output version information and exit\n");
     }
   exit (status);
 }
index 213dd987c8ef7f5baa5be075a6fd07bd8edaba07..1293fadb17d12da032bb89ac0073f8e83ba93a14 100644 (file)
--- a/src/yes.c
+++ b/src/yes.c
@@ -38,12 +38,10 @@ usage (status)
     {
       printf ("Usage: %s [OPTION]... [STRING]...\n", program_name);
       printf ("\
+Repeatedly output a line with all specified STRING(s), or `y'.\n\
 \n\
   --help      display this help and exit\n\
-  --version   output version information and exit\n\
-\n\
-Without any STRING, assume `y'.\n\
-");
+  --version   output version information and exit\n");
     }
   exit (status);
 }