let kubectl support double dashes which signfies positional parameters only
This commit is contained in:
parent
c461c1dea8
commit
ec6ec688e0
@ -254,14 +254,18 @@ function kubectl() {
|
||||
DEBUG=true
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
finalopts+=("$@")
|
||||
break
|
||||
;;
|
||||
*)
|
||||
finalopts+=($1)
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
[[ $DEBUG == "true" ]] && echo "kubectl $finalopts --kubeconfig=$HOME/.kube/${KCONTEXT}_config"
|
||||
command kubectl $finalopts --kubeconfig=$HOME/.kube/${KCONTEXT}_config
|
||||
[[ $DEBUG == "true" ]] && echo "kubectl --kubeconfig=$HOME/.kube/${KCONTEXT}_config $finalopts"
|
||||
command kubectl --kubeconfig=$HOME/.kube/${KCONTEXT}_config $finalopts
|
||||
}
|
||||
function stern {
|
||||
KCONTEXT=${KCONTEXT:-gcloud}
|
||||
|
Loading…
Reference in New Issue
Block a user