]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
cal: improve the help text and man page
authorPádraig Brady <P@draigBrady.com>
Wed, 9 Oct 2013 18:44:12 +0000 (20:44 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 11 Oct 2013 08:44:21 +0000 (10:44 +0200)
* misc-utils/cal.c: Add a little doc string, and mention that the
  current month is implicit if not specified.  Also remove mention
  of "current" from two option descriptions as a specific date may
  have been specified.
* misc-utils/cal.1: Likewise.

[kzak@redhat.com: - use fputs and USAGE_SEPARATOR]

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/cal.1
misc-utils/cal.c

index 4e7570d782227111e15b5793ebd2c08e4fd97d96..0e686dd987be33a91d3237fa46ea05f86463b91f 100644 (file)
@@ -51,7 +51,7 @@ Display single month output.
 (This is the default.)
 .TP
 \fB\-3\fR, \fB\-\-three\fR
-Display prev/current/next month output.
+Display three months spanning the date.
 .TP
 \fB\-s\fR, \fB\-\-sunday\fR
 Display Sunday as the first day of the week.
@@ -63,7 +63,7 @@ Display Monday as the first day of the week.
 Display Julian dates (days one-based, numbered from January 1).
 .TP
 \fB\-y\fR, \fB\-\-year\fR
-Display a calendar for the current year.
+Display a calendar for the whole year.
 .TP
 \fB\-\-color\fR [\fIwhen\fR]
 Colorize output.  The
index 76d62521b55510ef3d5e56d3c153841ea9b337ce..2360e3da7730bd23c9486a0eadeec52879caa9e7 100644 (file)
@@ -805,13 +805,17 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
        fputs(USAGE_HEADER, out);
        fprintf(out, _(" %s [options] [[[day] month] year]\n"), program_invocation_short_name);
 
+       fputs(USAGE_SEPARATOR, out);
+       fputs(_("Display a calendar, or some part of it.\n"), out);
+       fputs(_("Without any arguments, display the current month.\n"), out);
+
        fputs(USAGE_OPTIONS, out);
-       fputs(_(" -1, --one             show only current month (default)\n"), out);
-       fputs(_(" -3, --three           show previous, current and next month\n"), out);
+       fputs(_(" -1, --one             show only a single month (default)\n"), out);
+       fputs(_(" -3, --three           show three months spanning the date\n"), out);
        fputs(_(" -s, --sunday          Sunday as first day of week\n"), out);
        fputs(_(" -m, --monday          Monday as first day of week\n"), out);
        fputs(_(" -j, --julian          output Julian dates\n"), out);
-       fputs(_(" -y, --year            show whole current year\n"), out);
+       fputs(_(" -y, --year            show the whole year\n"), out);
        fputs(_("     --color[=<when>]  colorize messages (auto, always or never)\n"), out);
 
        fputs(USAGE_SEPARATOR, out);