fix: Set the current ns if one is not set
This commit is contained in:
parent
dac88324a5
commit
011ee485aa
@ -27,3 +27,4 @@ Examples:
|
|||||||
```
|
```
|
||||||
$ kubers -n $SECRET_NAME
|
$ kubers -n $SECRET_NAME
|
||||||
```
|
```
|
||||||
|
|
@ -20,6 +20,7 @@ funcion _kubers() {
|
|||||||
_values compadd $(kubectl get namespaces --no-headers -o custom-columns=":metadata.name")
|
_values compadd $(kubectl get namespaces --no-headers -o custom-columns=":metadata.name")
|
||||||
;;
|
;;
|
||||||
secret)
|
secret)
|
||||||
|
NAMESPACE=$(kubectl config view --minify -o jsonpath='{..namespace}')
|
||||||
for (( i = 1; i <= $#words - 1; i++ )); do
|
for (( i = 1; i <= $#words - 1; i++ )); do
|
||||||
if [[ $words[$i] == -n || $words[$i] == --namespace ]]; then
|
if [[ $words[$i] == -n || $words[$i] == --namespace ]]; then
|
||||||
NAMESPACE=$words[$((i+1))]
|
NAMESPACE=$words[$((i+1))]
|
||||||
|
Loading…
Reference in New Issue
Block a user