summaryrefslogtreecommitdiffstats
path: root/getopt
diff options
context:
space:
mode:
Diffstat (limited to 'getopt')
-rw-r--r--getopt/getopt.12
-rw-r--r--getopt/getopt.c35
2 files changed, 21 insertions, 16 deletions
diff --git a/getopt/getopt.1 b/getopt/getopt.1
index 2e6fbdadf..a8e05ba88 100644
--- a/getopt/getopt.1
+++ b/getopt/getopt.1
@@ -1,4 +1,4 @@
-.TH GETOPT 1 "May 31, 1997" Linux ""
+.TH GETOPT 1 "July 2009" "util-linux" "User Commands"
.SH NAME
getopt \- parse command options (enhanced)
.SH SYNOPSIS
diff --git a/getopt/getopt.c b/getopt/getopt.c
index a211bcb16..3a3105229 100644
--- a/getopt/getopt.c
+++ b/getopt/getopt.c
@@ -311,23 +311,28 @@ static void set_shell(const char *new_shell)
static void __attribute__ ((__noreturn__)) print_help(void)
{
- fprintf(stderr, _("Usage: %1$s optstring parameters\n"
- " %1$s [options] [--] optstring parameters\n"
- " %1$s [options] -o|--options optstring [options] [--] parameters\n"
- "\nOptions:\n"
- " -a, --alternative Allow long options starting with single -\n"
- " -h, --help This small usage guide\n"
- " -l, --longoptions=longopts Long options to be recognized\n"
- " -n, --name=progname The name under which errors are reported\n"
- " -o, --options=optstring Short options to be recognized\n"
- " -q, --quiet Disable error reporting by getopt(3)\n"
- " -Q, --quiet-output No normal output\n"
- " -s, --shell=shell Set shell quoting conventions\n"
- " -T, --test Test for getopt(1) version\n"
- " -u, --unquote Do not quote the output\n"
- " -V, --version Output version information\n\n"),
+ fputs(_("\nUsage:\n"), stderr);
+
+ fprintf(stderr, _(
+ " %1$s optstring parameters\n"
+ " %1$s [options] [--] optstring parameters\n"
+ " %1$s [options] -o|--options optstring [options] [--] parameters\n"),
program_invocation_short_name);
+ fputs(_("\nOptions:\n"), stderr);
+ fputs(_(" -a, --alternative Allow long options starting with single -\n"), stderr);
+ fputs(_(" -h, --help This small usage guide\n"), stderr);
+ fputs(_(" -l, --longoptions <longopts> Long options to be recognized\n"), stderr);
+ fputs(_(" -n, --name <progname> The name under which errors are reported\n"), stderr);
+ fputs(_(" -o, --options <optstring> Short options to be recognized\n"), stderr);
+ fputs(_(" -q, --quiet Disable error reporting by getopt(3)\n"), stderr);
+ fputs(_(" -Q, --quiet-output No normal output\n"), stderr);
+ fputs(_(" -s, --shell <shell> Set shell quoting conventions\n"), stderr);
+ fputs(_(" -T, --test Test for getopt(1) version\n"), stderr);
+ fputs(_(" -u, --unquote Do not quote the output\n"), stderr);
+ fputs(_(" -V, --version Output version information\n"), stderr);
+ fputc('\n', stderr);
+
exit(PARAMETER_EXIT_CODE);
}