]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
cal: remove optional from short arg -w
authorTommi Kyntola <kynde@iki.fi>
Mon, 7 Oct 2013 17:57:28 +0000 (20:57 +0300)
committerKarel Zak <kzak@redhat.com>
Tue, 22 Oct 2013 08:39:08 +0000 (10:39 +0200)
The long option --week still has the optional argument as --week=<wnum>

This was suggested on the mailing list by Padraig Brady and I do agree with that.
Actually, the whole idea of --week=<wnum> came from him.

Signed-off-by: Tommi Kyntola <kynde@iki.fi>
misc-utils/cal.1
misc-utils/cal.c

index 22e389f1415e7c13f2dbcb00fdba6945836b18f3..fa79f914f34e60f65154f8e640620ffcdcfba28e 100644 (file)
@@ -65,7 +65,7 @@ Display Julian dates (days one-based, numbered from January 1).
 \fB\-y\fR, \fB\-\-year\fR
 Display a calendar for the whole year.
 .TP
-\fB\-w\fR, \fB\-\-week\fR [\fInumber\fR]
+\fB\-w\fR, \fB\-\-week\fR[\fI=number\fR]
 Display week numbers in the calendar (US or ISO-8601).
 .TP
 \fB\-\-color\fR [\fIwhen\fR]
index c4db0b13ab8ae066fe532d864c7f08e852aa2646..c09b2f6ef144210ceb09674c8eb7a9329ee4ca6c 100644 (file)
@@ -339,7 +339,7 @@ int main(int argc, char **argv)
        }
 #endif
 
-       while ((ch = getopt_long(argc, argv, "13mjsyw::Vh", longopts, NULL)) != -1)
+       while ((ch = getopt_long(argc, argv, "13mjsywVh", longopts, NULL)) != -1)
                switch(ch) {
                case '1':
                        num_months = 1;         /* default */
@@ -983,7 +983,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
        fputs(_(" -m, --monday          Monday as first day of week\n"), out);
        fputs(_(" -j, --julian          output Julian dates\n"), out);
        fputs(_(" -y, --year            show the whole year\n"), out);
-       fputs(_(" -w, --week            show US or ISO-8601 week numbers\n"), out);
+       fputs(_(" -w, --week[=<num>]    show US or ISO-8601 week numbers\n"), out);
        fputs(_("     --color[=<when>]  colorize messages (auto, always or never)\n"), out);
 
        fputs(USAGE_SEPARATOR, out);