Bug 7101

Summary: getopt message for ambiguous options could be more helpful
Product: glibc Reporter: James Youngman <jay>
Component: libcAssignee: Ulrich Drepper <drepper.fsp>
Status: RESOLVED FIXED    
Severity: normal CC: glibc-bugs
Priority: P3 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: getopt patch to indicate two of the possible meanings of an ambiguous abbreviation

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.