Bug 85547 - RFE: Abbreviated long options
RFE: Abbreviated long options
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: popt (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-03 22:58 EST by Marcus Harnisch
Modified: 2007-04-18 12:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 17:44:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Marcus Harnisch 2003-03-03 22:58:32 EST
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:
Always

Steps to Reproduce:
N/A

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).

Currently:
getpopt -a -ol -llong -- -l
-long --

To be considered:
getpopt -a -ol -llong -- -l
-l --
Comment 1 Marcus Harnisch 2003-03-03 23:00:07 EST
Created attachment 90458 [details]
Support abbreviated long options in popt
Comment 2 Jeff Johnson 2003-06-25 13:35:24 EDT
Reasonable idea, I'll get there yet ...
Comment 3 Marcus Harnisch 2003-07-20 14:48:13 EDT
Oh, I forgot to mention that you can download getpopt here:
http://webpages.charter.net/harnisch/downloads/getpopt-0.12.tar.gz

Please don't post the address to Slashdot :-)
Comment 4 Bill Nottingham 2005-09-29 17:44:22 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

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.