helm.plugin.zsh 594 B

12345678910111213141516171819
  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 hun='helm uninstall'
  16. alias hse='helm search'
  17. alias hup='helm upgrade'