From: Tommi Kyntola Date: Mon, 7 Oct 2013 17:57:28 +0000 (+0300) Subject: cal: remove optional from short arg -w X-Git-Tag: v2.25-rc1~802 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af7c483e62128a59852da2603a94db4b7738f1b6;p=thirdparty%2Futil-linux.git cal: remove optional from short arg -w The long option --week still has the optional argument as --week= This was suggested on the mailing list by Padraig Brady and I do agree with that. Actually, the whole idea of --week= came from him. Signed-off-by: Tommi Kyntola --- diff --git a/misc-utils/cal.1 b/misc-utils/cal.1 index 22e389f141..fa79f914f3 100644 --- a/misc-utils/cal.1 +++ b/misc-utils/cal.1 @@ -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] diff --git a/misc-utils/cal.c b/misc-utils/cal.c index c4db0b13ab..c09b2f6ef1 100644 --- a/misc-utils/cal.c +++ b/misc-utils/cal.c @@ -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[=] show US or ISO-8601 week numbers\n"), out); fputs(_(" --color[=] colorize messages (auto, always or never)\n"), out); fputs(USAGE_SEPARATOR, out);