From: Joey Hess Date: Fri, 13 Mar 2009 20:27:24 +0000 (-0400) Subject: unknown option wording tweak X-Git-Tag: 3.08~4 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/f10f9e6f73f07f991c21c321b6b8c870fc501fe2?ds=inline;hp=--cc unknown option wording tweak Because getopt::long is used in passthrough mode, if a known option like --wikiname that needs a parameter is specified w/o the parameter, it will not be processed, and passed on through. So in this case the "unknown option" message is innaccurate. Make it slightly better by noting that the problem can be a missing parameter. --- f10f9e6f73f07f991c21c321b6b8c870fc501fe2 diff --git a/IkiWiki.pm b/IkiWiki.pm index f580d1f0d..a876bbb44 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -533,7 +533,7 @@ sub loadplugins () { run_hooks(getopt => sub { shift->() }); if (grep /^-/, @ARGV) { - print STDERR "Unknown option: $_\n" + print STDERR "Unknown option (or missing parameter): $_\n" foreach grep /^-/, @ARGV; usage(); }