Red Hat Bugzilla – Bug 1004385
rhsm-icon bash completions should not end with a comma
Last modified: 2013-11-21 16:28:31 EST
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
commit b93b4fecbff480a443f0611667e0b68ebabb15f3 Author: ckozak <ckozak@redhat.com> Date: Wed Sep 4 10:44:55 2013 -0400 1004385: rhsm icon completion fix
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)
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.
commit 630000bf6239874f7485008d95a1409fde338014 Author: ckozak <ckozak@redhat.com> Date: Mon Sep 16 09:52:49 2013 -0400 1004385: Add missing rhsm-icon debug options
(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.
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
commit 1b7422ea192803b39771a7bf38c8c9047680f94d Author: ckozak <ckozak@redhat.com> Date: Wed Sep 25 09:43:23 2013 -0400 1004385: remove some gtk help options
fixed in subscription-manager-1.9.7-1
(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
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
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