mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +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:
		@@ -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()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user