update completions

Andrew Coleman 2020-05-26 13:07:39 -04:00
parent 4e5d1c5eba
commit 63fcc23d6f
3 changed files with 5434 additions and 424 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
_kube_namespaces()
_kube_contexts()
{
local curr_arg;
curr_arg=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "- $(kubectl get namespaces -o=jsonpath='{range .items[*].metadata.name}{@}{"\n"}{end}')" -- $curr_arg ) );
COMPREPLY=( $(compgen -W "- $(kubectl config get-contexts --output='name')" -- $curr_arg ) );
}
complete -F _kube_namespaces kubens kns
complete -F _kube_contexts kubectx kctx

View File

@ -1,8 +1,8 @@
_kube_contexts()
_kube_namespaces()
{
local curr_arg;
curr_arg=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "- $(kubectl config get-contexts --output='name')" -- $curr_arg ) );
COMPREPLY=( $(compgen -W "- $(kubectl get namespaces -o=jsonpath='{range .items[*].metadata.name}{@}{"\n"}{end}')" -- $curr_arg ) );
}
complete -F _kube_contexts kubectx kctx
complete -F _kube_namespaces kubens kns