Dynamic completion for 'helm plugin remove/update'

Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca>
pull/6263/head
Marc Khouzam 6 years ago
parent 8742b670b4
commit e615d65961

@ -73,6 +73,14 @@ __helm_list_repos()
COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) )
fi fi
} }
__helm_list_plugins()
{
__helm_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
local out
if out=$(helm plugin list | tail +2 | cut -f1 2>/dev/null); then
COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) )
fi
}
__helm_custom_func() __helm_custom_func()
{ {
__helm_debug "${FUNCNAME[0]}: last_command is $last_command" __helm_debug "${FUNCNAME[0]}: last_command is $last_command"
@ -85,6 +93,9 @@ __helm_custom_func()
helm_repo_remove) helm_repo_remove)
__helm_list_repos __helm_list_repos
;; ;;
helm_plugin_remove | helm_plugin_update)
__helm_list_plugins
;;
*) *)
;; ;;
esac esac

Loading…
Cancel
Save