diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 49e1d64a3..0b60842f2 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -80,7 +80,6 @@ __helm_list_releases() fi } - __helm_list_repos() { __helm_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" @@ -92,6 +91,17 @@ __helm_list_repos() fi } +__helm_list_plugins() +{ + __helm_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" + local out oflags + oflags=$(__helm_override_flags) + __helm_debug "${FUNCNAME[0]}: __helm_override_flags are ${oflags}" + if out=$(helm plugin list ${oflags} | tail +2 | cut -f1 2>/dev/null); then + COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) + fi +} + __helm_custom_func() { __helm_debug "${FUNCNAME[0]}: c is $c words[@] is ${words[@]}" @@ -100,11 +110,15 @@ __helm_custom_func() helm_upgrade | helm_rollback | helm_get_*) __helm_list_releases return - ;; + ;; helm_repo_remove) __helm_list_repos return ;; + helm_plugin_remove | helm_plugin_update) + __helm_list_plugins + return + ;; *) ;; esac