mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +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()
|
__kubectl_get_namespaces()
|
||||||
{
|
{
|
||||||
local template kubectl_out
|
__kubectl_parse_get "namespace"
|
||||||
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_config_get_contexts()
|
__kubectl_config_get_contexts()
|
||||||
|
Loading…
Reference in New Issue
Block a user