mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-18 10:22:00 +00:00
fix(kubectl): support completion for snap installs (#10727)
This commit is contained in:
parent
97e6989729
commit
e934857537
1 changed files with 2 additions and 2 deletions
|
@ -11,11 +11,11 @@ if (( $+commands[kubectl] )); then
|
|||
# If the completion file does not exist, generate it and then source it
|
||||
# Otherwise, source it and regenerate in the background
|
||||
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"
|
||||
else
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue