Description of problem:
The oc tar file on the customer portal should ship with the bash completion scripts, and a READ me on how to install them.
With out this you have to do something like:
sudo curl -o /etc/bash_completion.d/oc https://raw.githubusercontent.com/openshift/origin/master/contrib/completions/bash/oc
Re-assigning to CLI team, I think there's a way to install completions using the oc binary but I'm not familiar with it. If possible it'd be nice for the binary to do this automatically if possible or make it glaringly obvious how to do it when completions aren't installed.
There is an easy way to install bash completions using oc, @jvallejo will add a comment to explain, because of that I'm lowering sev. We might consider adding info to oc help if we can detect completions aren't installed. Not sure we should go so far as 'oc' automatically installing completions when it sees they aren't there.
There is currently a way to install completions just using the oc binary by sourcing the output of "$oc completion <SHELL_NAME>". Although only bash and zsh are supported at the moment, a user can install completions by sourcing the output of this command:
$ source <(oc completion bash)
This must be done every time a new shell is opened, but could definitely be added to .bashrc to solve this:
$ echo "source <(oc completion bash)" >> ~/.bashrc
$ echo "source <(oc completion zsh)" >> ~/.zshrc
"oc completion -h" contains some examples and further instructions that guides a user on adding completion support to bash in general when running in older versions of bash.
Maybe we could add a note in the output of `oc -h` that prompts the user to see `oc completion -h` for help on installing completions?
Moving this to the installer team. We would need to source the output of `oc completion bash` as part of the install process for the `oc` binary.
/etc/bash_completion.d/oc is already deployed whenever the installer is used by way of the atomic-openshift-clients package.