coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint: fix output for unknown long options for utils without lon


From: Bernhard Voelker
Subject: [PATCH] maint: fix output for unknown long options for utils without long option
Date: Tue, 28 Nov 2017 22:56:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

The attached addresses the case when the user passes an invalid
long option to a utility which does not have any long options
(apart from --help/--version, of course).
See commit comment for details.

I saw this when trying to write the check to verify the options
mentioned by usage() versus that actually recognized by getopt_long.

I'm also a bit confused that/why we obviously cannot teach gnulib's
parse_long_options to already diagnose this in the first run, so
that the following getopt_long call would become obsolete?

BTW: How do we mark patches which belong to several tools and
are user-visible, but the list of utilities is quite long?
  cksum dd hostid hostname link logname nohup sleep tsort
  unlink uptime users whoami yes
Probably this warrants a NEW entry?

Comments welcome.

Thanks & have a nice day,
Berny

Attachment: 0001-maint-fix-output-for-unknown-long-options-for-utils-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]