added k9s completions

This commit is contained in:
Shubham Rajvanshi 2024-09-23 17:20:35 -05:00
commit 5b14c70c92
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,11 @@
if (( $+commands[k9s] )); 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/_k9s" ]]; then
k9s completion zsh | tee "$ZSH_CACHE_DIR/completions/_k9s" >/dev/null
source "$ZSH_CACHE_DIR/completions/_k9s"
else
source "$ZSH_CACHE_DIR/completions/_k9s"
k9s completion zsh | tee "$ZSH_CACHE_DIR/completions/_k9s" >/dev/null &|
fi
fi