set own theme
This commit is contained in:
9
.zsh/theme/functions/kubernetes.zsh
Normal file
9
.zsh/theme/functions/kubernetes.zsh
Normal file
@@ -0,0 +1,9 @@
|
||||
function get_kubectl_context() {
|
||||
if (( $+commands[kubectl] )); then
|
||||
local context=$(kubectl config current-context 2>/dev/null)
|
||||
local namespace=$(kubectl config view --minify --output 'jsonpath={..namespace}' 2>/dev/null)
|
||||
if [[ -n "$context" ]]; then
|
||||
echo "%F{blue}⎈ $context:$namespace%f"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user