helm.plugin.zsh
594 bytes
1if (( ! $+commands[helm] )); then
2 return
3fi
4
5# If the completion file does not exist, generate it and then source it
6# Otherwise, source it and regenerate in the background
7if [[ ! -f "$ZSH_CACHE_DIR/completions/_helm" ]]; then
8 helm completion zsh | tee "$ZSH_CACHE_DIR/completions/_helm" >/dev/null
9 source "$ZSH_CACHE_DIR/completions/_helm"
10else
11 source "$ZSH_CACHE_DIR/completions/_helm"
12 helm completion zsh | tee "$ZSH_CACHE_DIR/completions/_helm" >/dev/null &|
13fi
14
15alias h='helm'
16alias hin='helm install'
17alias hun='helm uninstall'
18alias hse='helm search'
19alias hup='helm upgrade'