Bug 1004318

Summary: rct [cat-cert cat-manifest dump-manifest stat-cert] does not bash complete its options
Product: Red Hat Enterprise Linux 5 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.11CC: bkearney, qianzhan
Target Milestone: betaKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-29 19:05:28 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: 863175    

Description John Sefler 2013-09-04 12:06:32 UTC
Description of problem:
Each of the rct modules has options, but they are not bash completing.


Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# rpm -q subscription-manager python-rhsm bash-completion
subscription-manager-1.9.5-1.el6.x86_64
python-rhsm-1.9.4-1.el6.x86_64
bash-completion-1.3-7.el6.noarch


Steps to Reproduce:
[root@jsefler-6 ~]# rct cat-cert -<TAB><TAB>
Expected results: -h  --help  --no-products  --no-content

[root@jsefler-6 ~]# rct cat-manifest -<TAB><TAB>
Expected results: -h  --help

[root@jsefler-6 ~]# rct dump-manifest -<TAB><TAB>
Expected results: -h  --help  --destination  -f  --force

[root@jsefler-6 ~]# rct stat-cert -<TAB><TAB>
Expected results: -h  --help


Additional Info:
bash completion of the modules works well...
[root@jsefler-6 ~]# rct <TAB><TAB>
cat-cert       cat-manifest   dump-manifest  stat-cert

Comment 1 Bryan Kearney 2013-11-04 14:08:42 UTC
commit 86269bf8b3b3686dc99e21a0ec1e22b363242ba6
Author: Bryan Kearney <bkearney>
Date:   Mon Oct 28 16:38:45 2013 -0400

    1004318: Bash completion for rct was not handing options and file lists correctly.
    
    Now, if you enter a command like:
    
    rct cat-cert <TAB>
    
    it will list out the file names. If you enter:
    
    rct cat-cert -<TAB>
    
    it will show you the options.

Comment 2 John Sefler 2014-01-24 22:23:54 UTC
Verifying Version...
[root@jsefler-7 ~]# rpm -q subscription-manager python-rhsm bash-completion
subscription-manager-1.10.11-1.el7.x86_64
python-rhsm-1.10.11-1.el7.x86_64
bash-completion-2.1-6.el7.noarch


[root@jsefler-7 ~]# rct cat-cert -h | egrep "^ +-"
  -h, --help     show this help message and exit
  --no-products  do not show the cert's product information
  --no-content   do not show the cert's content info
[root@jsefler-7 ~]# rct cat-cert -<TAB>
-h             --help         --no-content   --no-products  


[root@jsefler-7 ~]# rct cat-manifest -h | egrep "^ +-"
  -h, --help  show this help message and exit
[root@jsefler-7 ~]# rct cat-manifest -<TAB>
-h      --help 


[root@jsefler-7 ~]# rct dump-manifest -h | egrep "^ +-"
  -h, --help            show this help message and exit
  --destination=DESTINATION
  -f, --force           overwrite files which may exist
[root@jsefler-7 ~]# rct dump-manifest -<TAB>
--destination  -f             --force        -h             --help


[root@jsefler-7 ~]# rct stat-cert -h | egrep "^ +-"
  -h, --help  show this help message and exit
[root@jsefler-7 ~]# rct stat-cert -<TAB>
-h      --help

Comment 3 Ludek Smid 2014-06-13 13:07: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.

Comment 5 qianzhan 2014-07-01 10:16:25 UTC
The bug exists on latest RHEL5.11, so open it.


Verifying Version:
subscription-manager: 1.11.3-6.el5
python-rhsm: 1.11.3-3.el5

Comment 6 John Sefler 2014-08-08 14:14:34 UTC
Verifying Version...
[root@jsefler-5 ~]# rpm -q subscription-manager python-rhsm bash-completion
subscription-manager-1.11.3-10.el5
python-rhsm-1.11.3-5.el5
bash-completion-1.3-7.el5


[root@jsefler-5 ~]# rct cat-cert -h | egrep "^ +-"
  -h, --help     show this help message and exit
  --no-products  do not show the cert's product information
  --no-content   do not show the cert's content info
[root@jsefler-5 ~]# rct cat-cert -<TAB><TAB>
-h             --help         --no-content   --no-products  


[root@jsefler-5 ~]# rct cat-manifest -h | egrep "^ +-"
  -h, --help  show this help message and exit
[root@jsefler-5 ~]# rct cat-manifest -<TAB><TAB>
-h      --help  


[root@jsefler-5 ~]# rct dump-manifest -h | egrep "^ +-"
  -h, --help            show this help message and exit
  --destination=DESTINATION
  -f, --force           overwrite files which may exist
[root@jsefler-5 ~]# rct dump-manifest -<TAB><TAB>
--destination  -f             --force        -h             --help


[root@jsefler-5 ~]# rct stat-cert -h | egrep "^ +-"
  -h, --help  show this help message and exit
[root@jsefler-5 ~]# rct stat-cert -<TAB><TAB>
-h      --help  


VERIFIED: This bug was fixed for RHEL7.0 as verified in comment 2
VERIFIED: This bug was fixed for RHEL5.11 as verified in this comment 6

Comment 7 Bryan Kearney 2014-09-29 19:05:28 UTC
These bugs were fixed during 7.0 but not moved to CLOSED. They have been delivered