diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 07546fd34..5ff400736 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -84,6 +84,12 @@ prompt_context() { fi } +prompt_kubernetes() { + + local cluster=$(kubectl config current-context | grep --colour=never -o '^[^.]*\.[^.]*') + prompt_segment magenta black "☁️ ${cluster}☁️ " +} + # Git: branch/detached head, dirty status prompt_git() { (( $+commands[git] )) || return @@ -216,6 +222,7 @@ prompt_status() { build_prompt() { RETVAL=$? prompt_status + prompt_kubernetes prompt_virtualenv prompt_context prompt_dir