Move kubernetes commands to partial
This commit is contained in:
parent
c391bf9589
commit
5b90d759d5
13
zsh.d/kubernetes.zsh
Normal file
13
zsh.d/kubernetes.zsh
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
if command-exists "kubectl"; then
|
||||
source <(kubectl completion zsh)
|
||||
fi
|
||||
|
||||
if command-exists "k3s"; then
|
||||
source <(k3s completion zsh)
|
||||
fi
|
||||
|
||||
if command-exists "minikube"; then
|
||||
source <(minikube completion zsh)
|
||||
fi
|
||||
|
||||
18
zshrc
18
zshrc
@ -368,24 +368,6 @@ store_last_return_value() {
|
||||
# This must be exactly first precmd function, because other precmd might modify $?
|
||||
precmd_functions=(store_last_return_value $precmd_functions)
|
||||
|
||||
# If kubectl is present, load completions from it.
|
||||
# This must be done after compinit was called
|
||||
if [[ $commands[kubectl] ]]; then
|
||||
source <(kubectl completion zsh)
|
||||
fi
|
||||
|
||||
# If k3s is present, load completions from it.
|
||||
# This must be done after compinit was called
|
||||
if [[ $commands[k3s] ]]; then
|
||||
source <(k3s completion zsh)
|
||||
fi
|
||||
|
||||
# If minikube is present, load completions from it.
|
||||
# This must be done after compinit was called
|
||||
if [[ $commands[minikube] ]]; then
|
||||
source <(minikube completion zsh)
|
||||
fi
|
||||
|
||||
zmodload zsh/complist
|
||||
|
||||
#---------------------------------- Partials ------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user