argocd.plugin.zsh 418 B

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