From Bugzilla Helper: User-Agent: Mozilla/5.0 Galeon/1.2.8 (X11; Linux i686; U;) Gecko/20021208 Description of problem: When a multi-character option string contains at least one unknown option, the entire option string (including valid options) is returned by poptBadOption(). Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: Write a tool using the basic option parsing loop. Actual Results: Example (again, using my [not so] imaginary tool getpopt) $ ./getpopt -of -- -bar getpopt: unknown option '-bar' -- $ ./getpopt -of -- -foo getpopt: unknown option '-foo' -f -- Expected Results: $ ./getpopt -of -- -bar getpopt: unknown option '-b' getpopt: unknown option '-a' getpopt: unknown option '-r' -- $ ./getpopt -of -- -foo getpopt: unknown option '-o' getpopt: unknown option '-o' -f -- Additional info:
I call these featlets or bugtures depending on mood ;-) Yes, I can see that there is potential for confusion when displaying the output of poptBadOption, but the current behavior of returning the entire token isn't too bad; Think of the behavior as displaying additional contextual info. Deferred for contemplation when I next make a pass through popt code.