ohmyzsh/plugins/k9s/k9s.plugin.zsh
2024-09-23 17:20:35 -05:00

11 lines
475 B
Bash

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