fix: Set the current ns if one is not set
This commit is contained in:
		@@ -20,6 +20,7 @@ funcion _kubers() {
 | 
			
		||||
        _values compadd $(kubectl get namespaces --no-headers -o custom-columns=":metadata.name")
 | 
			
		||||
        ;;
 | 
			
		||||
      secret)
 | 
			
		||||
        NAMESPACE=$(kubectl config view --minify -o jsonpath='{..namespace}')
 | 
			
		||||
        for (( i = 1; i <= $#words - 1; i++ )); do
 | 
			
		||||
            if [[ $words[$i] == -n || $words[$i] == --namespace  ]]; then
 | 
			
		||||
                NAMESPACE=$words[$((i+1))]
 | 
			
		||||
@@ -40,4 +41,4 @@ funcion _kubers() {
 | 
			
		||||
        _values compadd $(for KEY in $(kubectl --namespace $NAMESPACE get secret $SECRET_NAME -o yaml | yq '.data | keys' | sed -e "s/- //"); do echo $KEY; done)
 | 
			
		||||
        ;;
 | 
			
		||||
      esac
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user