Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 85547

Summary: RFE: Abbreviated long options
Product: [Retired] Red Hat Linux Reporter: Marcus Harnisch <marcus.harnisch>
Component: poptAssignee: Jeff Johnson <jbj>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-29 21:44:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Support abbreviated long options in popt none

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:
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-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:
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 21:44:22 UTC
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.