Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install kubectl autocompletion plugin for zsh?

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 ?

like image 400
Bravo Avatar asked Jan 02 '23 19:01

Bravo


1 Answers

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

working setup

like image 165
Manu Avatar answered Jan 05 '23 16:01

Manu