Merge pull request #5731 from ahmetb/zsh

Fix kubectl zsh completion instructions
pull/5969/head
Tim(Xiaoyu) Zhang 2017-10-19 20:33:30 +08:00 committed by GitHub
commit 1152364756
1 changed files with 5 additions and 3 deletions

View File

@ -187,11 +187,13 @@ kubectl completion bash > $(brew --prefix)/etc/bash_completion.d/kubectl
The Homebrew project is independent from Kubernetes, so the bash-completion packages are not guaranteed to work. The Homebrew project is independent from Kubernetes, so the bash-completion packages are not guaranteed to work.
### Using Oh-My-Zsh ### Using zsh
When using [Oh-My-Zsh](http://ohmyz.sh/), edit the ~/.zshrc file and update the `plugins=` line to include the kubectl plugin.
To add kubectl autocompletion to your ZSH profile, add the following line to
the ~/.zshrc file:
```shell ```shell
plugins=(git zsh-completions kubectl) source <(kubectl completion zsh)
``` ```
{% endcapture %} {% endcapture %}