How to enable OpenShift oc bash auto completion
1 min readNov 27, 2018
If you deployed the Openshift Linux client from tar.gz, bash auto completion script will not be enabled by default. You have to enable it manually with the following commands
# yum -y install bash-completion
# oc completion bash >>/etc/bash_completion.d/oc_completion
Logout and login again to activate oc completion. Type oc then press TAB two times. You will see all available options.
$ oc
adm autoscale create explain import-image new-project process rollout set
annotate cancel-build debug expose label observe project rsh start-build
api-resources cluster delete extract login options projects rsync status
api-versions completion describe get logout patch proxy run tag
apply config edit idle logs plugin registry scale version
attach convert ex image new-app policy replace secrets wait
auth cp exec import new-build port-forward rollback serviceaccounts whoami