skaffold.plugin.zsh 435 B

1234567891011121314
  1. # Autocompletion for skaffold
  2. if (( ! $+commands[skaffold] )); then
  3. return
  4. fi
  5. # If the completion file doesn't exist yet, we need to autoload it and
  6. # bind it to `skaffold`. Otherwise, compinit will have already done that.
  7. if [[ ! -f "$ZSH_CACHE_DIR/completions/_skaffold" ]]; then
  8. typeset -g -A _comps
  9. autoload -Uz _skaffold
  10. _comps[skaffold]=_skaffold
  11. fi
  12. skaffold completion zsh >| "$ZSH_CACHE_DIR/completions/_skaffold" &|