From 0c5ae3a8ace333fcafff237fa4707b6469df10e5 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 4 Nov 2009 16:09:30 -0700 Subject: 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. --- src/mktemp.c | 35 +++++++++++++++-------------------- 1 file 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); -- cgit v1.2.3-54-g00ecf