Fix context discovery

This commit is contained in:
Simon Westcott
2017-05-11 12:44:11 +01:00
parent d1c04555f4
commit d04543ffef
2 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ _kube_contexts()
{
local curr_arg;
curr_arg=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "- $(kubectl config get-contexts | awk '{print $2}' | tail -n +2)" -- $curr_arg ) );
COMPREPLY=( $(compgen -W "- $(kubectl config get-contexts --output='name')" -- $curr_arg ) );
}
complete -F _kube_contexts kubectx
complete -F _kube_contexts kubectx