k9s.plugin.zsh 394 B

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