helm.plugin.zsh 567 B

123456789101112131415161718
  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
  13. alias h='helm'
  14. alias hin='helm install'
  15. alias hse='helm search'
  16. alias hup='helm upgrade'