|
|
|
@ -11,11 +11,11 @@ if (( $+commands[kubectl] )); then |
|
|
|
# If the completion file does not exist, generate it and then source it |
|
|
|
# If the completion file does not exist, generate it and then source it |
|
|
|
# Otherwise, source it and regenerate in the background |
|
|
|
# Otherwise, source it and regenerate in the background |
|
|
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_kubectl" ]]; then |
|
|
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_kubectl" ]]; then |
|
|
|
kubectl completion zsh >| "$ZSH_CACHE_DIR/completions/_kubectl" |
|
|
|
kubectl completion zsh | tee "$ZSH_CACHE_DIR/completions/_kubectl" >/dev/null |
|
|
|
source "$ZSH_CACHE_DIR/completions/_kubectl" |
|
|
|
source "$ZSH_CACHE_DIR/completions/_kubectl" |
|
|
|
else |
|
|
|
else |
|
|
|
source "$ZSH_CACHE_DIR/completions/_kubectl" |
|
|
|
source "$ZSH_CACHE_DIR/completions/_kubectl" |
|
|
|
kubectl completion zsh >| "$ZSH_CACHE_DIR/completions/_kubectl" &| |
|
|
|
kubectl completion zsh | tee "$ZSH_CACHE_DIR/completions/_kubectl" >/dev/null &| |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|