I installed ohmyz.sh , on my mac book , i want to install kubectl autocompletion plugin for zsh , but not aware of the steps to install , can any one help on this please ?
how to install kubectl autocompletion plugin for zsh?
Asked Answered
Another option: I like having the following setup;
~/.zshrc: define which plugins I want to load
...
plugins=(
git
...
kubectl
)
...
~/.oh-my-zsh/custom/plugins/*: define my custom plugins, in this case override the kubectl from OhMyZsh with the file that this command generates:
kubectl completion zsh > ~/.oh-my-zsh/custom/plugins/kubectl.plugin.zsh
According to official kubectl documentation:
when using Oh-My-Zsh, edit the ~/.zshrc file and update the plugins= line to include the kubectl plugin.
source <(kubectl completion zsh)
© 2022 - 2024 — McMap. All rights reserved.