Bug 7101 - getopt message for ambiguous options could be more helpful
Summary: getopt message for ambiguous options could be more helpful
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-14 19:17 UTC by James Youngman
Modified: 2014-07-02 07:53 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
getopt patch to indicate two of the possible meanings of an ambiguous abbreviation (1.06 KB, patch)
2008-12-14 19:20 UTC, James Youngman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Youngman 2008-12-14 19:17:36 UTC
$ xargs --ma 7 
xargs: option `--ma' is ambiguous

Indicating that this might be an abbreviation for --max-lines or --max-chars
would be more helpful.
Comment 1 James Youngman 2008-12-14 19:20:00 UTC
Created attachment 3107 [details]
getopt patch to indicate two of the possible meanings of an ambiguous abbreviation

This patch includes two of the possible expansions of the abbreviation the user
specified in the error message the user sees.
Comment 2 Ulrich Drepper 2011-05-15 17:36:11 UTC
Golden rule in CS: the only acceptable numbers are 0, 1, oo.  Just printing two of possibly many options is not acceptable.  I added a patch which prints all options.