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 921222 - Tab Completion of commands for modules and optons
Summary: Tab Completion of commands for modules and optons
Keywords:
Status: CLOSED DUPLICATE of bug 1001820
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 6.5
Assignee: Bryan Kearney
QA Contact: Bryan Kearney
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel65
TreeView+ depends on / blocked
 
Reported: 2013-03-13 18:11 UTC by Sharath Dwaral
Modified: 2013-09-04 13:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-04 13:43:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sharath Dwaral 2013-03-13 18:11:19 UTC
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 Program Management 2013-04-09 20:57:15 UTC
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 19:54:21 UTC
fixed in subscription-manager 1.8.10-1

Comment 4 Sharath Dwaral 2013-06-05 18:32:30 UTC
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 19:11:25 UTC
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 12:53:07 UTC
d8cd14d64f10e5437a3ef5d710fb1aaf2b91e355

subscription-manager.git

Comment 7 Sharath Dwaral 2013-07-16 20:03:32 UTC
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 17:50:00 UTC
pr at https://github.com/candlepin/subscription-manager/pull/705

Comment 9 Adrian Likins 2013-07-22 20:35:47 UTC
commit bc8e0f04dffdbbf083b6547089e71cc2f6188735
Author: Adrian Likins <alikins>
Date:   Mon Jul 22 13:46:58 2013 -0400

    921222: add 'status' to bash completion

Comment 10 Bryan Kearney 2013-08-01 15:55:29 UTC
Moving these to ON_QA. The tooling must have missed moving these.

Comment 11 Sharath Dwaral 2013-08-05 19:23:52 UTC
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 18:19:39 UTC
This is available as of 1.9.2.

Comment 18 Sharath Dwaral 2013-09-04 13:43:04 UTC
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.