summaryrefslogtreecommitdiff
path: root/src/mktemp.c
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-11-04 16:09:30 -0700
committerEric Blake <ebb9@byu.net>2009-11-05 06:59:03 -0700
commit0c5ae3a8ace333fcafff237fa4707b6469df10e5 (patch)
tree53109426dd156b0345e5324723644fb9c2f6ebfe /src/mktemp.c
parente89a5e9b132a1f83e63a02ae8c6459fd6c41372b (diff)
downloadcoreutils-0c5ae3a8ace333fcafff237fa4707b6469df10e5.tar.xz
mktemp: rearrange --help output
* src/mktemp.c (usage): Align indentation and sort by long options. Describe valid templates. Suggested by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548316.
Diffstat (limited to 'src/mktemp.c')
-rw-r--r--src/mktemp.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/src/mktemp.c b/src/mktemp.c
index 2b6e4b45f..e967d8eca 100644
--- a/src/mktemp.c
+++ b/src/mktemp.c
@@ -65,33 +65,28 @@ usage (int status)
printf (_("Usage: %s [OPTION]... [TEMPLATE]\n"), program_name);
fputs (_("\
Create a temporary file or directory, safely, and print its name.\n\
-If TEMPLATE is not specified, use tmp.XXXXXXXXXX.\n\
+TEMPLATE must end in at least 3 consecutive `X's.\n\
+If TEMPLATE is not specified, use tmp.XXXXXXXXXX, and --tmpdir is implied.\n\
"), stdout);
fputs ("\n", stdout);
fputs (_("\
- -d, --directory create a directory, not a file\n\
+ -d, --directory create a directory, not a file\n\
+ -u, --dry-run do not create anything; merely print a name (unsafe)\n\
+ -q, --quiet suppress diagnostics about file/dir-creation failure\n\
"), stdout);
fputs (_("\
- -q, --quiet suppress diagnostics about file/dir-creation failure\n\
-"), stdout);
- fputs (_("\
- -u, --dry-run do not create anything; merely print a name (unsafe)\n\
-"), stdout);
- fputs (_("\
- --tmpdir[=DIR] interpret TEMPLATE relative to DIR. If DIR is\n\
- not specified, use $TMPDIR if set, else /tmp.\n\
- With this option, TEMPLATE must not be an absolute name.\n\
- Unlike with -t, TEMPLATE may contain slashes, but even\n\
- here, mktemp still creates only the final component.\n\
+ --tmpdir[=DIR] interpret TEMPLATE relative to DIR. If DIR is not\n\
+ specified, use $TMPDIR if set, else /tmp. With\n\
+ this option, TEMPLATE must not be an absolute name.\n\
+ Unlike with -t, TEMPLATE may contain slashes, but\n\
+ mktemp creates only the final component.\n\
"), stdout);
fputs ("\n", stdout);
fputs (_("\
- -p DIR use DIR as a prefix; implies -t [deprecated]\n\
-"), stdout);
- fputs (_("\
- -t interpret TEMPLATE as a single file name component,\n\
- relative to a directory: $TMPDIR, if set; else the\n\
- directory specified via -p; else /tmp [deprecated]\n\
+ -p DIR use DIR as a prefix; implies -t [deprecated]\n\
+ -t interpret TEMPLATE as a single file name component,\n\
+ relative to a directory: $TMPDIR, if set; else the\n\
+ directory specified via -p; else /tmp [deprecated]\n\
"), stdout);
fputs ("\n", stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -178,7 +173,7 @@ main (int argc, char **argv)
case_GETOPT_HELP_CHAR;
- case 'V':
+ case 'V': /* Undocumented alias. FIXME: remove in 2011. */
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (EXIT_FAILURE);