Bug 921222 - Tab Completion of commands for modules and optons
Tab Completion of commands for modules and optons
Status: CLOSED DUPLICATE of bug 1001820
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: beta
: 6.5
Assigned To: Bryan Kearney
Bryan Kearney
:
Depends On:
Blocks: rhsm-rhel65
  Show dependency treegraph
 
Reported: 2013-03-13 14:11 EDT by Sharath Dwaral
Modified: 2013-09-04 09:43 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-04 09:43:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sharath Dwaral 2013-03-13 14:11:19 EDT
Description of problem:
For some commands there is tab completion only for modules and some have it both for modules and options.


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

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-firstboot-1.8.4-1.el7.x86_64
python-rhsm-1.8.7-1.el7.x86_64
subscription-manager-1.8.4-1.el7.x86_64
subscription-manager-debuginfo-1.8.4-1.el7.x86_64
subscription-manager-gui-1.8.4-1.el7.x86_64
subscription-manager-migration-1.8.4-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:

Scenario 1:  Command: subscription-manager

# subscription-manager --help
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

Primary Modules:

  attach         Attach a specified subscription to the registered system
  list           List subscription and product information for this system
  refresh        Pull the latest subscription data from the server
  register       Register this system to the Customer Portal or another subscription management service
  release        Configure which operating system release to use
  remove         Remove all or specific subscriptions from this system
  unregister     Unregister this system from the Customer Portal or another subscription management service

Other Modules:

  clean          Remove all local system and subscription data without affecting the server
  config         List, set, or remove the configuration parameters in use by this system
  environments   Display the environments available for a user
  facts          View or update the detected system information
  identity       Display the identity certificate for this system or request a new one
  import         Import certificates which were provided outside of the tool
  orgs           Display the organizations against which a user can register a system
  plugins        View and configure subscription-manager plugins
  redeem         Attempt to redeem a subscription for a preconfigured system
  repos          List the repositories which this system is entitled to use
  service-level  Manage service levels for this system
  subscribe      Deprecated, see attach
  unsubscribe    Deprecated, see remove
  version        Print version information

Tab Completion:

# subscription-manager 
attach         config         facts          import         orgs           redeem         register       remove         service-level  unregister     
clean          environments   identity       list           plugins        refresh        release        repos          subscribe      unsubscribe 

> version not displayed in tab completion

===================XXXXXXXXXXXXXXXXXXXXXXXXXXX======================

Scenario 2: Command: rct

# rct 
cat-cert  cat-manifest   dump-manifest  stat-cert

> Apart from cat-cert the other modules have only -h or --help options these dont get auto completed on tab.
> cat-cert tab completes only after typing '--' (double dash)

Unlike the subscription-manager tab completion does not list all the options. (subscription-manager register exaple shown below)

 subscription-manager register -
--activationkey  --consumerid     --force          --help           --org            --proxy          --proxyuser      --servicelevel   --username       
--autosubscribe  --environment    -h               --name           --password       --proxypassword  --release        --type

the '-' (single dash) is also auto completed on hitting tab.

===================XXXXXXXXXXXXXXXXXXXXXXXXXXX======================

Scenario 3: Command: rhn-magrate-classic-to-rhsm

> options not tab completed

===================XXXXXXXXXXXXXXXXXXXXXXXXXXX======================

Scenario 4: Command: rhsmcertd

> options not tab completed

===================XXXXXXXXXXXXXXXXXXXXXXXXXXX======================

Scenario 4: Command: rhsm-icon

> options not tab completed

===================XXXXXXXXXXXXXXXXXXXXXXXXXXX======================

Actual Results:   See 'Steps to reproduce'

Expected results: See 'Steps to reproduce'


Additional info:
Comment 1 RHEL Product and Program Management 2013-04-09 16:57:15 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 2 Jesus M. Rodriguez 2013-06-04 15:54:21 EDT
fixed in subscription-manager 1.8.10-1
Comment 4 Sharath Dwaral 2013-06-05 14:32:30 EDT
Version:

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-migration-data-1.11.3.1-1.git.1.78afd75.el5
subscription-manager-migration-1.8.10-1.git.1.b44c4b1.el5
python-rhsm-1.8.12-1.git.0.d747a65.el5
subscription-manager-firstboot-1.8.10-1.git.1.b44c4b1.el5
subscription-manager-1.8.10-1.git.1.b44c4b1.el5
subscription-manager-gui-1.8.10-1.git.1.b44c4b1.el5

Command: subscription-manager

>>       "status" does not auto complete (works for all other commands and options)

Command: rct

>>       Works for commands and options

Command: rhn-migrate-classic-to-rhsm

>>       Command "options" do not auto complete

Command: rhsmcertd

>>       Command "options" do not auto complete

Command: rhsm-icon

>>       Command "options" do not auto complete


Moving Back to NEW
Comment 5 Sharath Dwaral 2013-06-05 15:11:25 EDT
My mistake

Commands "rhsmcertd", "rhsm-icon", "rhn-migrate-classic-to-rhsm" tab completes "options" only after "-" is entered.

the behavior of this is different from that of "subscription-manager" and "rct" where the options are tab completed without entering a "-"

Would prefer the behavior of tab-completion to be the same for all commands

Leaving it in NEW
Comment 6 Cory Scheviak 2013-06-13 08:53:07 EDT
d8cd14d64f10e5437a3ef5d710fb1aaf2b91e355

subscription-manager.git
Comment 7 Sharath Dwaral 2013-07-16 16:03:32 EDT
Version:

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-1.8.13-1.el5_9
subscription-manager-migration-1.8.13-1.el5_9
python-rhsm-1.8.13-1.el5_9
subscription-manager-migration-data-1.11.3.1-1.git.1.78afd75.el5
subscription-manager-firstboot-1.8.13-1.el5_9
subscription-manager-debuginfo-1.8.13-1.el5_9
subscription-manager-gui-1.8.13-1.el5_9

Command : subscription-manager

subscription-manager tab completion does not show "status" option
                                                  ^^^^^^^^

Command : rhsm-icon

rhsm-icon tab completion does not show GTK+ options
                                       ^^^^^^^^^^^^

Moving back to NEW
Comment 8 Adrian Likins 2013-07-22 13:50:00 EDT
pr at https://github.com/candlepin/subscription-manager/pull/705
Comment 9 Adrian Likins 2013-07-22 16:35:47 EDT
commit bc8e0f04dffdbbf083b6547089e71cc2f6188735
Author: Adrian Likins <alikins@redhat.com>
Date:   Mon Jul 22 13:46:58 2013 -0400

    921222: add 'status' to bash completion
Comment 10 Bryan Kearney 2013-08-01 11:55:29 EDT
Moving these to ON_QA. The tooling must have missed moving these.
Comment 11 Sharath Dwaral 2013-08-05 15:23:52 EDT
Version:

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-1.8.16-1.el5
subscription-manager-debuginfo-1.8.16-1.el5
subscription-manager-migration-data-1.11.3.2-1.git.0.14f9d59.el5
subscription-manager-firstboot-1.8.16-1.el5
python-rhsm-1.8.16-1.el5
subscription-manager-migration-1.8.16-1.el5
python-rhsm-debuginfo-1.8.16-1.el5
subscription-manager-gui-1.8.16-1.el5

The below is the result of tab completion of the command.
It can be seen that its provides an option "i--auto" which is not a part of the help menu.

# subscription-manager subscribe 
-h               --help           i--auto          --pool           --proxy          --proxypassword  --proxyuser      --quantity       --servicelevel  

Additional information:

# subscription-manager subscribe --help
Usage: subscription-manager subscribe [OPTIONS]

Deprecated, see attach

options:
  -h, --help            show this help message and exit
  --proxy=PROXY_URL     proxy URL in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for HTTP proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for HTTP proxy with basic authentication
  --pool=POOL           the ID of the pool to attach (can be specified more
                        than once)
  --quantity=QUANTITY   number of subscriptions to attach
  --auto                automatically attach compatible subscriptions to this
                        system
  --servicelevel=SERVICE_LEVEL
                        service level to apply to this system


Moving o NEW
Comment 17 Bryan Kearney 2013-09-03 14:19:39 EDT
This is available as of 1.9.2.
Comment 18 Sharath Dwaral 2013-09-04 09:43:04 EDT
Closing this bug in favor of Bug 1001820

The issue in comment 11 is dealt with in the bug mentioned above.

*** This bug has been marked as a duplicate of bug 1001820 ***

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