Update: Using universal zsh configuration (#5669)

* Update install-kubectl.md

Zsh is not only oh-my-zsh, so I added universal configuration for zsh that also can be used in prezto.

* fix merge error after rebase
This commit is contained in:
Rizky Ariestiyansyah
2017-10-26 22:50:09 +07:00
committed by zacharysarah
parent 08f98d070c
commit 7b48c52d26
+10 -3
View File
@@ -187,10 +187,17 @@ 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.
### Using zsh
### Using Zsh
If you are using zsh edit the ~/.zshrc file and add the following code to enable kubectl autocompletion:
```shell
if [ $commands[kubectl] ]; then
source <(kubectl completion zsh)
fi
```
Or 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
source <(kubectl completion zsh)