diff --git a/zsh/functions.zsh b/zsh/functions.zsh index c003534..d7e8d96 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -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}