Bug 85547 - RFE: Abbreviated long options
Summary: RFE: Abbreviated long options
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: popt
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-03-04 03:58 UTC by Marcus Harnisch
Modified: 2007-04-18 16:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2005-09-29 21:44:22 UTC

Attachments (Terms of Use)
Support abbreviated long options in popt (1.97 KB, patch)
2003-03-04 04:00 UTC, Marcus Harnisch
no flags Details | Diff

Description Marcus Harnisch 2003-03-04 03:58:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.8 (X11; Linux i686; U;) Gecko/20021208

Description of problem:
The attached patch adds support for abbreviated long options to
popt-1.7 (possibly other versions as well).

How it works:

1. if there is an exact match for a long option, use it.

2. else check if there are multiple partial matches and complain about
   ambiguous long option.

3. else use long option that matches.

The patch adds the new error symbol POPT_ERROR_AMBIGUOUS (-12)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Additional info:

To obtain behaviour similar to GNU getopt(3), it should be considered
to detect short options before looking at long options. That way a
short option would always be preferred if the following conditions
apply (assuming a program getpopt exists that resembles getopt(1)
from util-linux).

getpopt -a -ol -llong -- -l
-long --

To be considered:
getpopt -a -ol -llong -- -l
-l --

Comment 1 Marcus Harnisch 2003-03-04 04:00:07 UTC
Created attachment 90458 [details]
Support abbreviated long options in popt

Comment 2 Jeff Johnson 2003-06-25 17:35:24 UTC
Reasonable idea, I'll get there yet ...

Comment 3 Marcus Harnisch 2003-07-20 18:48:13 UTC
Oh, I forgot to mention that you can download getpopt here:

Please don't post the address to Slashdot :-)

Comment 4 Bill Nottingham 2005-09-29 21:44:22 UTC
Closing bugs on older, no longer supported, releases. Apologies for any lack of

For RPM issues, please try a current release such as Fedora Core 4; if bugs
persist, please open a new issue.

Note You need to log in before you can comment on or make changes to this bug.