diff --git a/files/.config/zsh/custom/100-alias.zsh b/files/.config/zsh/custom/100-alias.zsh index 231928d..ac7a731 100644 --- a/files/.config/zsh/custom/100-alias.zsh +++ b/files/.config/zsh/custom/100-alias.zsh @@ -28,6 +28,9 @@ alias browsh="docker run --rm -it browsh/browsh" # kube alias netshoot="kubectl run tmp-shell --rm -i --tty --image nicolaka/netshoot -- /bin/bash" alias kubectl="kubecolor" +alias k="kubecolor" +alias kctx="kubectl config use-context" +alias kns="kubectl config set-context --current --namespace" compdef kubecolor=kubectl diff --git a/files/.config/zsh/custom/themes/custom.zsh-theme b/files/.config/zsh/custom/themes/custom.zsh-theme index 613dd36..bb64f6f 100644 --- a/files/.config/zsh/custom/themes/custom.zsh-theme +++ b/files/.config/zsh/custom/themes/custom.zsh-theme @@ -86,7 +86,7 @@ prompt_cmd() { # kubernetes context if which kubectl &>/dev/null; then - local kubectl_context="%{$FG[008]%}[$(kubectl config current-context)] " + local kubectl_context="%{$FG[008]%}[$(kubectl config current-context)|$(kubectl config view --minify -o jsonpath='{..namespace}')] " fi # name@hostname