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 2227014 - Bash completion of rhc does not work
Summary: Bash completion of rhc does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhc
Version: 8.9
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: CSI Client Tools Bugs
QA Contact: CSI Client Tools Bugs
URL:
Whiteboard:
Depends On: 2145198
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-27 12:54 UTC by Alba Hita
Modified: 2023-11-14 17:09 UTC (History)
11 users (show)

Fixed In Version: rhc-0.2.4-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2145198
Environment:
Last Closed: 2023-11-14 15:36:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github RedHatInsights rhc pull 38 0 None Merged Fix/bash completion 2023-07-27 13:04:32 UTC
Red Hat Issue Tracker RHELPLAN-163685 0 None None None 2023-07-27 12:58:08 UTC
Red Hat Product Errata RHSA-2023:7058 0 None None None 2023-11-14 15:37:21 UTC

Description Alba Hita 2023-07-27 12:54:50 UTC
+++ This bug was initially created as a clone of Bug #2145198 +++

Description of problem:
Bash completion of rhc CLI tool does not work. The bash completion of rhcd does not work too for the same reason.

Version-Release number of selected component (if applicable):
[root@rhel9 ~]# rhc --version
rhc version 0.2.1

How reproducible:
100%

Steps to Reproduce:
1. Try to use bash completion of some sub-command or CLI option of rhc and it just does not work. Type "rhc " press <Tab><Tab>...

Actual results:
... and nothing happens.

Expected results:
List of sub-command and CLI options is printed.

Additional info:
More info is available in this GitHub issue: https://github.com/RedHatInsights/rhc/issues/27

--- Additional comment from Rehana on 2023-06-26 13:08:37 UTC ---

Martin , Pls share the link to the PR.

Comment 1 John Sefler 2023-07-28 21:19:43 UTC
Pre-verifying preliminary copr build https://coprbe.devel.redhat.com/results/ahitacat/rhc/rhel-8-x86_64/00108010-rhc/rhc-0.2.4-0.2.git.a67ca4e.el8.x86_64.rpm

[root@kvm-03-guest20 ~]# rpm -q rhc bash-completion
rhc-0.2.4-0.2.git.a67ca4e.el8.x86_64
bash-completion-2.7-5.el8.noarch
[root@kvm-03-guest20 ~]# 
[root@kvm-03-guest20 ~]# rhc --version
rhc version 0.2.4
[root@kvm-03-guest20 ~]# 
[root@kvm-03-guest20 ~]# rhc --help
NAME:
   rhc - control the system's connection to Red Hat

USAGE:
   rhc [global options] command [command options] [arguments...]

VERSION:
   0.2.4

DESCRIPTION:
   The rhc command controls the system's connection to Red Hat.
   
   To connect the system using an activation key:
     rhc connect --organization ID --activation-key KEY
   
   To connect the system using a username and password:
     rhc connect --username USERNAME --password PASSWORD
   
   To disconnect the system:
     rhc disconnect
   
   Run 'rhc command --help' for more details.

COMMANDS:
   connect     Connects the system to Red Hat
   disconnect  Disconnects the system from Red Hat
   status      Prints status of the system's connection to Red Hat
   help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --no-color     (default: false) [$NO_COLOR]
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)
[root@kvm-03-guest20 ~]# 
[root@kvm-03-guest20 ~]# rhc <TAB><TAB>
-a                --format          --no-color        status
--activation-key  -h                -o                -u
connect           h                 --organization    --username
disconnect        --help            -p                -v
-f                help              --password        --version
[root@kvm-03-guest20 ~]# rhc -<TAB><TAB>
-a                -h                --organization    --username
--activation-key  --help            -p                -v
-f                --no-color        --password        --version
--format          -o                -u                
[root@kvm-03-guest20 ~]# rhc --<TAB><TAB>
--activation-key  --help            --organization    --username
--format          --no-color        --password        --version
[root@kvm-03-guest20 ~]# rhc --^C
[root@kvm-03-guest20 ~]# rhc co<TAB>nnect^C
[root@kvm-03-guest20 ~]# rhc di<TAB>sconnect^C
[root@kvm-03-guest20 ~]# rhc st<TAB>atus^C
[root@kvm-03-guest20 ~]# rhc he<TAB>lp^C
[root@kvm-03-guest20 ~]# rhc h<TAB><TAB>
h     help  
[root@kvm-03-guest20 ~]# rhc h^C
[root@kvm-03-guest20 ~]# 

VERIFIED: Tab completion successfully completes all of the rhc commands, options, and global options.

Comment 4 Zdenek Petracek 2023-08-21 16:18:23 UTC
[root@kvm-02-guest04 ~]# rpm -qa | grep rhc
rhc-0.2.4-1.el8.x86_64

[root@kvm-02-guest04 ~]# rhc --help
NAME:
   rhc - control the system's connection to Red Hat

USAGE:
   rhc [global options] command [command options] [arguments...]

VERSION:
   0.2.4

DESCRIPTION:
   The rhc command controls the system's connection to Red Hat.
   
   To connect the system using an activation key:
     rhc connect --organization ID --activation-key KEY
   
   To connect the system using a username and password:
     rhc connect --username USERNAME --password PASSWORD
   
   To disconnect the system:
     rhc disconnect
   
   Run 'rhc command --help' for more details.

COMMANDS:
   connect     Connects the system to Red Hat
   disconnect  Disconnects the system from Red Hat
   status      Prints status of the system's connection to Red Hat
   help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --no-color     (default: false) [$NO_COLOR]
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)

[root@kvm-02-guest04 ~]# rhc  <tab><tab>
-a                -f                --help            --organization    -u
--activation-key  --format          help              -p                --username
connect           -h                --no-color        --password        -v
disconnect        h                 -o                status            --version

[root@kvm-02-guest04 ~]# rhc -<tab><tab>
-a                --format          --no-color        -p                --username
--activation-key  -h                -o                --password        -v
-f                --help            --organization    -u                --version

[root@kvm-02-guest04 ~]# rhc --<tab><tab>
--activation-key  --help            --organization    --username        
--format          --no-color        --password        --version 
^^completion successfully completes all of the rhc commands, options, and global options --> PASSED

Comment 6 errata-xmlrpc 2023-11-14 15:36:50 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 (Moderate: rhc security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2023:7058


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