Note that lately zsh completion should work out of the box with openshift origin, you just have to do a source <(oc completion zsh)
from your shell and it should give you completion. There is still things that this plugin do better in some cases but down the line the effort should be focused on improving the completion inside openshift-origin
This is a oh-my-zsh
plugin to provide shell completion of the OpenShift v3 commands with ZSH.
oh-my-zsh
is a zsh framworks making it easy to customise your ZSH Shell. You can find out more about it here :
There is a bash completion in the openshift source that are autogenerated by OpenShift but I never got it to work with bashcompctl
or even with bash directly under MacosX so I wrote my own from scratch.
Install oh-my-zsh
if you haven't it installed following this :
https://github.com/robbyrussell/oh-my-zsh/#basic-installation
and execute this :
$ git clone https://github.com/chmouel/oh-my-zsh-openshift ~/.oh-my-zsh/custom/plugins/oc
you can edit your ~/.zshrc and add oc
to the plugins
variable like for example :
plugins=(oc git)
I actually don't use oh-my-zsh
so if you want to use the vanilla zsh you can just checkout this to a directory like ~/.zsh/oc
:
$ mkdir -p ~/.zsh/;git clone https://github.com/chmouel/oh-my-zsh-openshift ~/.zsh/oc
In your ~/.zshrc
put thing like this :
typeset -U fpath # Optinal for oh-my-zsh users
fpath=(~/.zsh/oc $fpath)
autoload -U compinit
compinit -i
- Chmouel Boudjnah [email protected]
- Vincent Behar [email protected]
APL 1.0 -- http://opensource.org/licenses/APL-1.0