Description of problem: Bash auto compltion is broken when we run verb + noun like oc get <TAB><TAB>, oc edit <TAB><TAB> etc.. Current Result Bash auto-completion does not work Expected Result List the api-resources
This was fixed in 4.1, I don't see too much chance in backporting this fix into older release until explicitly asked and approved by BU/PM.
Confirmed with latest oc version, the issue has fixed: [root@dhcp-140-138 ~]# oc version Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.22", GitCommit:"24e868508", GitTreeState:"clean", BuildDate:"2019-10-26T03:37:23Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"} [root@dhcp-140-138 ~]# oc edit Display all 155 possibilities? (y or n) alertmanagers.monitoring.coreos.com endpoints operatorgroups.operators.coreos.com apiservers.config.openshift.io events operatorhubs.config.openshift.io ......
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, 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/RHBA-2019:3294
Confirmed with oc , 4.1 could compatible with ocp server 3.11: [root@dhcp-140-138 ~]# oc version Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.24", GitCommit:"c41acf267", GitTreeState:"clean", BuildDate:"2019-11-08T08:19:24Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2019-10-31T21:06:55Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"} [root@dhcp-140-138 ~]# oc edit alertmanagers.monitoring.coreos.com events.events.k8s.io prometheusrules.monitoring.coreos.com apiservices.apiregistration.k8s.io groups.user.openshift.io rangeallocations.security.openshift.io appliedclusterresourcequotas.quota.openshift.io horizontalpodautoscalers.autoscaling replicasets.apps ....
$ wget https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.1.24-201911080309.git.0.c41acf2.el7/linux/oc.tar.gz --2019-11-13 23:53:19-- https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.1.24-201911080309.git.0.c41acf2.el7/linux/oc.tar.gz Resolving mirror.openshift.com (mirror.openshift.com)... 54.172.173.155, 54.172.163.83, 54.173.18.88 Connecting to mirror.openshift.com (mirror.openshift.com)|54.172.173.155|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 22456367 (21M) [application/x-gzip] Saving to: ‘oc.tar.gz’ 100%[========================================================================================================>] 22,456,367 10.6MB/s in 2.0s 2019-11-13 23:53:21 (10.6 MB/s) - ‘oc.tar.gz’ saved [22456367/22456367] $ tar -xvf oc.tar.gz $ ls oc oc.tar.gz index.html netapp-api-exporter $ /home/quicklab/oc version Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.24", GitCommit:"c41acf267", GitTreeState:"clean", BuildDate:"2019-11-08T08:19:24Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2019-10-10T16:48:37Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"} $ /home/quicklab/oc get .ansible/ .bash_profile index.html netapp-api-exporter/ .pki/ .viminfo .bash_history .bashrc .kube/ oc pv.txt .bash_logout hawkular-metrics-1.yml .lesshst oc.tar.gz .ssh/ $ /home/quicklab/oc edit .ansible/ .bash_profile index.html netapp-api-exporter/ .pki/ .viminfo .bash_history .bashrc .kube/ oc pv.txt .bash_logout hawkular-metrics-1.yml .lesshst oc.tar.gz .ssh/ oc-client binary of ocp4.1.24 does not work in OCP3.11. Also tried oc-client binary of ocp4.1.23 but still does not work.
Please refer https://bugzilla.redhat.com/show_bug.cgi?id=1766099#c12
From the first <tab> action it looks like the autocompletion is working correctly, for further invocation a running cluster is needed, do you have one? That mean you need to login the cluster.