helm.plugin.zsh 477 B

12345678910111213
  1. if (( ! $+commands[helm] )); then
  2. return
  3. fi
  4. # If the completion file does not exist, generate it and then source it
  5. # Otherwise, source it and regenerate in the background
  6. if [[ ! -f "$ZSH_CACHE_DIR/completions/_helm" ]]; then
  7. helm completion zsh | tee "$ZSH_CACHE_DIR/completions/_helm" >/dev/null
  8. source "$ZSH_CACHE_DIR/completions/_helm"
  9. else
  10. source "$ZSH_CACHE_DIR/completions/_helm"
  11. helm completion zsh | tee "$ZSH_CACHE_DIR/completions/_helm" >/dev/null &|
  12. fi