k9s.plugin.zsh
394 bytes
1if (( ! $+commands[k9s] )); then
2 return
3fi
4
5# If the completion file does not exist, fake it and load it
6if [[ ! -f "$ZSH_CACHE_DIR/completions/_k9s" ]]; then
7 typeset -g -A _comps
8 autoload -Uz _k9s
9 _comps[k9s]=_k9s
10fi
11
12# and then generate it in the background. On first completion,
13# the actual completion file will be loaded.
14k9s completion zsh >| "$ZSH_CACHE_DIR/completions/_k9s" &|