Bug 994493

Summary: cli: improve bash completion
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Dolezal <todoleza>
Component: firewalldAssignee: Thomas Woerner <twoerner>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Dolezal <todoleza>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: jpopelka, rbors, twoerner
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:34:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 980210    

Description Tomas Dolezal 2013-08-07 11:51:09 UTC
Description of problem:
bash completion: automatic completion does not work until one or two leading dashes are entered before tapping <tab>.
Also, if user specify e.g. `firwall-cmd --add-service=http <tab>` only --timeout is completed. After that completion finishes. -> What if user wants to specify permanent instead of --timeout? Of course it is possible by prepending it to --add-service, but that is not much friendly.

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

How reproducible:
always

Steps to Reproduce:
firewall-cmd --add-service=http <tab>

Actual results:
completion: firewall-cmd --add-service=http --timeout=

Expected results:
completion: firewall-cmd --add-service=http <tab><tab>
            --permament --timeout --zone (and maybe other options)

please fix or provide information why do you think it shouldn't be fixed this way
thanks

Additional info:
CCed affiliated users

Comment 2 Jiri Popelka 2013-09-20 14:32:37 UTC
(In reply to Tomas Dolezal from comment #0)
> bash completion: automatic completion does not work until one or two leading
> dashes are entered before tapping <tab>.

It's the same with iptables tool, i.e. one needs to add a leading dash before <tab> starts to work.

> Also, if user specify e.g. `firwall-cmd --add-service=http <tab>` only
> --timeout is completed. After that completion finishes. -> What if user
> wants to specify permanent instead of --timeout? Of course it is possible by
> prepending it to --add-service, but that is not much friendly.

Fixed upstream:
https://git.fedorahosted.org/cgit/firewalld.git/commit/?id=813a9abf57c68416e51be7b6f24d16cdf82ab191

Comment 9 Ludek Smid 2014-06-13 12:34:36 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.