mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Fix completions for --namespace to override flags
Due to not using __kubectl_parse_get, __kubectl_get_namespaces doesn't support to override kubectl flags.
This commit is contained in:
parent
7018479968
commit
fe598e0401
@ -69,11 +69,7 @@ __kubectl_override_flags()
|
||||
|
||||
__kubectl_get_namespaces()
|
||||
{
|
||||
local template kubectl_out
|
||||
template="{{ range .items }}{{ .metadata.name }} {{ end }}"
|
||||
if kubectl_out=$(kubectl get -o template --template="${template}" namespace 2>/dev/null); then
|
||||
COMPREPLY=( $( compgen -W "${kubectl_out[*]}" -- "$cur" ) )
|
||||
fi
|
||||
__kubectl_parse_get "namespace"
|
||||
}
|
||||
|
||||
__kubectl_config_get_contexts()
|
||||
|
Loading…
Reference in New Issue
Block a user