summaryrefslogtreecommitdiff
path: root/plugins/kubectl
diff options
context:
space:
mode:
authorCarlo Sala <carlosalag@protonmail.com>2022-02-24 19:23:41 +0100
committerGitHub <noreply@github.com>2022-02-24 19:23:41 +0100
commite9348575371aa8ec8811356d997942559c026d07 (patch)
tree5e88d877de829422befaf8413484e4324de6a66d /plugins/kubectl
parent97e6989729efce1f091d02e0274392ed547b9bb4 (diff)
downloadzsh-e9348575371aa8ec8811356d997942559c026d07.tar.gz
zsh-e9348575371aa8ec8811356d997942559c026d07.tar.bz2
zsh-e9348575371aa8ec8811356d997942559c026d07.zip
fix(kubectl): support completion for snap installs (#10727)
Diffstat (limited to 'plugins/kubectl')
-rw-r--r--plugins/kubectl/kubectl.plugin.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh
index eed5727d1..89efeaca5 100644
--- a/plugins/kubectl/kubectl.plugin.zsh
+++ b/plugins/kubectl/kubectl.plugin.zsh
@@ -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