Bug 2080416 - oc bash-completion problem
Summary: oc bash-completion problem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.10
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.11.0
Assignee: Arda Guclu
QA Contact: zhou ying
URL:
Whiteboard:
: 2087079 (view as bug list)
Depends On:
Blocks: 2084429
TreeView+ depends on / blocked
 
Reported: 2022-04-29 15:29 UTC by Divyam Pateriya
Modified: 2023-03-27 20:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: oc project <tab-completion> causes oc project project Consequence: users can not use tab completion for oc project command Fix: oc project <tab-completion> will list projects Result:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:09:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 1125 0 None open Bug 2080416: Fix project command auto completion 2022-05-05 13:23:22 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:10:26 UTC

Description Divyam Pateriya 2022-04-29 15:29:37 UTC
Description of problem:
oc bash-completion problem on oc project command


Version-Release number of selected component (if applicable):
# oc version
  Client Version: 4.10.10
  Server Version: 4.10.10
  Kubernetes Version: v1.23.5+9ce5071

How reproducible:
100%

Steps to Reproduce:
1. # oc completion bash > oc_bash_completion
2. # source oc_bash_completion
3. # export KUBECONFIG=kubeconfig

Actual results:

# oc proj[TAB]
  ├> oc project [TAB]
  | Here it should print project names. But I get
  ├> oc project project
  └> oc project project [TAB]

Expected results:

The oc cli should print the project names when pressing TAB after "oc project [TAB]" command. 

Additional info:

Comment 5 zhou ying 2022-05-07 10:05:42 UTC
oc project [TAB] will show all the projects now:

oc project 
testpforzy  zhouyttt2


oc projects
You have access to the following projects and can switch between them with ' project <projectname>':

  * testpforzy
    zhouyttt2

Using project "testpforzy" on server "https://api.yinzhou-07a.qe.gcp.devcluster.openshift.com:6443".


oc version --client
Client Version: 4.11.0-202205070617.p0.g0bf70d5.assembly.stream-0bf70d5
Kustomize Version: v4.5.4

Comment 6 Arda Guclu 2022-05-12 06:36:39 UTC
Backport to 4.10 PR has been opened https://github.com/openshift/oc/pull/1131

Comment 7 Maciej Szulik 2022-05-25 10:30:12 UTC
*** Bug 2087079 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2022-08-10 11:09: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 (Important: OpenShift Container Platform 4.11.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:5069


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