RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1004385 - rhsm-icon bash completions should not end with a comma
Summary: rhsm-icon bash completions should not end with a comma
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel65
TreeView+ depends on / blocked
 
Reported: 2013-09-04 14:12 UTC by John Sefler
Modified: 2013-11-21 21:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Consequence: tab completion displays comma (,) after option. Fix: Remove the comma Result:
Clone Of:
Environment:
Last Closed: 2013-11-21 21:28:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1659 0 normal SHIPPED_LIVE subscription-manager and python-rhsm bug fix and enhancement update 2013-11-20 21:53:10 UTC

Description John Sefler 2013-09-04 14:12:21 UTC
Description of problem:

[root@jsefler-6 ~]# rhsm-icon -<TAB><TAB>
-c,                   --check-period,       --debug,              -f,                   -h,                   --help-all,           -i,
--check-immediately,  -d,                   --display             --force-icon,         --help,               --help-gtk,       

With the exception of "--display", notice that all of the proposed tab completions above end with a comma.  This should not happen.  The tab completions should be valid options; "-c" is a valid option, "-c," is not a valid option.

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

Offending file:
/etc/bash_completion.d/rhsm-icon

Comment 1 Carter Kozak 2013-09-12 15:07:37 UTC
commit b93b4fecbff480a443f0611667e0b68ebabb15f3
Author: ckozak <ckozak>
Date:   Wed Sep 4 10:44:55 2013 -0400

    1004385: rhsm icon completion fix

Comment 3 John Sefler 2013-09-13 18:27:27 UTC
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager bash-completion
subscription-manager-1.9.6-1.el6.x86_64
bash-completion-1.3-7.el6.noarch

[root@jsefler-6 ~]# rhsm-icon -h 
Usage:
  rhsm-icon [OPTION...] 

Help Options:
  -h, --help                  Show help options
  --help-all                  Show all help options
  --help-gtk                  Show GTK+ Options

Application Options:
  -c, --check-period          how often to check for validity (in seconds)
  -d, --debug                 show debug messages
  -f, --force-icon=TYPE       force display of the icon (expired, partial or warning)
  -i, --check-immediately     run the first status check right away
  --display=DISPLAY           X display to use

[root@jsefler-6 ~]# rhsm-icon -<TAB><TAB>
-c                   --debug              -h                   -i
--check-immediately  --display            --help               
--check-period       -f                   --help-all           
-d                   --force-icon         --help-gtk       


VERIFIED: tab completion of rhsm-icon properly displays all thirteen options (without comma suffix)

Comment 4 John Sefler 2013-09-16 02:32:04 UTC
Reopening this bug because we should include TAB completion on the gtk options too.

[root@jsefler-6 ~]# rhsm-icon --help-all 
Usage:
  rhsm-icon [OPTION...] 

Help Options:
  -h, --help                  Show help options
  --help-all                  Show all help options
  --help-gtk                  Show GTK+ Options

GTK+ Options
  --class=CLASS               Program class as used by the window manager
  --name=NAME                 Program name as used by the window manager
  --screen=SCREEN             X screen to use
  --gdk-debug=FLAGS           Gdk debugging flags to set
  --gdk-no-debug=FLAGS        Gdk debugging flags to unset
  --sync                      Make X calls synchronous
  --gtk-module=MODULES        Load additional GTK+ modules
  --g-fatal-warnings          Make all warnings fatal
  --gtk-debug=FLAGS           GTK+ debugging flags to set
  --gtk-no-debug=FLAGS        GTK+ debugging flags to unset

Application Options:
  -c, --check-period          how often to check for validity (in seconds)
  -d, --debug                 show debug messages
  -f, --force-icon=TYPE       force display of the icon (expired, partial or warning)
  -i, --check-immediately     run the first status check right away
  --display=DISPLAY           X display to use


As demonstrated in comment 3, tab completion is working for most all of the command options except the gtk options.  Please tab complete these too.


Additional info:  The gtk options differ between RHEL 5 and RHEL 6.  The RHEL 6 gtk options are shown above.  The RHEL5 gtk options are as follows...

[root@jsefler-5 ~]# rhsm-icon --help-gtk
Usage:
  rhsm-icon [OPTION...] 

GTK+ Options
  --class=CLASS               Program class as used by the window manager
  --name=NAME                 Program name as used by the window manager
  --display=DISPLAY           X display to use
  --screen=SCREEN             X screen to use
  --sync                      Make X calls synchronous
  --gtk-module=MODULES        Load additional GTK+ modules
  --g-fatal-warnings          Make all warnings fatal

On RHEL5, options --gdk-debug --gdk-no-debug --gtk-debug --gtk-no-debug are excluded.

On RHEL7, the gtk options appear to be the same as on RHEL6.

Comment 5 Carter Kozak 2013-09-19 18:36:43 UTC
commit 630000bf6239874f7485008d95a1409fde338014
Author: ckozak <ckozak>
Date:   Mon Sep 16 09:52:49 2013 -0400

    1004385: Add missing rhsm-icon debug options

Comment 6 John Sefler 2013-09-24 22:27:14 UTC
(In reply to Carter Kozak from comment #5)
>     1004385: Add missing rhsm-icon debug options

Looks like you misread comment 4

The GTK options that need to be added to the tab completion logic for subscription-manager on RHEL6 and RHEL7 are:
  --class
  --name
  --screen
  --gdk-debug
  --gdk-no-debug
  --sync
  --gtk-module
  --g-fatal-warnings
  --gtk-debug=FLAGS
  --gtk-no-debug=FLAGS

You only added tab completion logic for --gdk-debug --gdk-no-debug --gtk-debug --gtk-no-debug
Comment 4 says that on RHEL5 (FIVE) that subscription-manager's tab completion logic should exclude these debug options.

Moving back to ASSIGNED.

Comment 7 Carter Kozak 2013-09-25 13:42:49 UTC
Removing gtk-debug and gdk-debug options from rhsm-icon.

We will support tab completion of options visible from "rhsm-icon --help" not options from rhsm-icon --help-gtk, however the --help-gtk option will be completed

Comment 8 Carter Kozak 2013-09-25 14:21:25 UTC
commit 1b7422ea192803b39771a7bf38c8c9047680f94d
Author: ckozak <ckozak>
Date:   Wed Sep 25 09:43:23 2013 -0400

    1004385: remove some gtk help options

Comment 9 Bryan Kearney 2013-09-26 18:05:19 UTC
fixed in subscription-manager-1.9.7-1

Comment 10 John Sefler 2013-09-27 16:41:16 UTC
(In reply to Bryan Kearney from comment #9)
> fixed in subscription-manager-1.9.7-1

Nope: comment 8 has not yet been cherry-picked to RHEL6.5 subscription-manager-1.9.7-1.el6

Comment 13 Sharath Dwaral 2013-10-07 23:51:33 UTC
Version:

Tested on stage

# subscription-manager version 
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.9.9-1.el6
python-rhsm: 1.9.6-1.el6

As per Comment 7, rhsm-icon will tab complete without GTK options

# rhsm-icon -
-c                   --check-period       --debug              -f                   -h                   --help-all           -i                   
--check-immediately  -d                   --display            --force-icon         --help               --help-gtk

VERIFIED

Comment 14 errata-xmlrpc 2013-11-21 21:28:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1659.html


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