[zsh] Optionally load kubectl completion

This commit is contained in:
Sebastian Schulze 2019-10-15 20:28:49 +02:00
parent 91f922370d
commit 87a517b471
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
1 changed files with 5 additions and 0 deletions

View File

@ -74,6 +74,11 @@ function fzf-ssh () {
zle reset-prompt
}
# Only load kubectl completion when needed. I's bog-slow
if [ -f $KUBECONFIG ]; then
source <(kubectl completion zsh);
fi;
zle -N fzf-ssh
bindkey '\es' fzf-ssh