Bug 2101885 - The bash completion doesn't work for get subcommand
Summary: The bash completion doesn't work for get subcommand
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.11
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.12.0
Assignee: Arda Guclu
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks: 2107003
TreeView+ depends on / blocked
 
Reported: 2022-06-28 15:59 UTC by Alexander Chuzhoy
Modified: 2023-01-17 19:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-17 19:50:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 1186 0 None open Bug 2101885: Set completion function for get command 2022-06-30 13:32:59 UTC
Red Hat Product Errata RHSA-2022:7399 0 None None None 2023-01-17 19:51:16 UTC

Description Alexander Chuzhoy 2022-06-28 15:59:54 UTC
4.11.0-fc.0

With bash completion enabled, we're unable to complete the command for "oc get".

Bash completion does work for other sub-commands like describe.

Comment 2 zhou ying 2022-07-05 08:35:23 UTC
[root@localhost ~]# ./oc version --client
Client Version: 4.11.0-fc.0
Kustomize Version: v4.5.4
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# ./oc get 
Display all 192 possibilities? (y or n)
alertmanagerconfigs.monitoring.coreos.com                        kubecontrollermanagers.operator.openshift.io
alertmanagers.monitoring.coreos.com                              kubeletconfigs.machineconfiguration.openshift.io
apirequestcounts.apiserver.openshift.io                          kubeschedulers.operator.openshift.io
apiservers.config.openshift.io                                   kubestorageversionmigrators.operator.openshift.io
apiservices.apiregistration.k8s.io                               leases.coordination.k8s.io
appliedclusterresourcequotas.quota.openshift.io                  limitranges
....

Comment 3 zhou ying 2022-07-05 13:07:52 UTC
with latest oc version , can't reproduce the issue now:


source <(./oc  completion bash)
[root@localhost ~]# ./oc version --client
Client Version: 4.12.0-0.nightly-2022-07-05-122228
Kustomize Version: v4.5.4
[root@localhost ~]# ./oc get 
Display all 192 possibilities? (y or n)
alertmanagerconfigs.monitoring.coreos.com                        kubeapiservers.operator.openshift.io
alertmanagers.monitoring.coreos.com                              kubecontrollermanagers.operator.openshift.io
apirequestcounts.apiserver.openshift.io                          kubeletconfigs.machineconfiguration.openshift.io
apiservers.config.openshift.io                                   kubeschedulers.operator.openshift.io
apiservices.apiregistration.k8s.io                               kubestorageversionmigrators.operator.openshift.io

Comment 4 Arda Guclu 2022-08-03 09:48:11 UTC
*** Bug 2110359 has been marked as a duplicate of this bug. ***

Comment 5 Arda Guclu 2022-08-03 10:00:24 UTC
I set duplicate id of 4.12.

This is 4.11 https://bugzilla.redhat.com/show_bug.cgi?id=2107003
and thishttps://github.com/openshift/oc/pull/1206  is the patch waiting to be approved.

Comment 9 errata-xmlrpc 2023-01-17 19:50:54 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: OpenShift Container Platform 4.12.0 bug fix and security 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-2022:7399


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