From f33e1b1fb15a7fa0ea8f05f96b93d3579db6e5da Mon Sep 17 00:00:00 2001 From: Pavle Portic Date: Wed, 27 Apr 2022 17:24:24 +0200 Subject: [PATCH] Add kubectl prompt --- boban.zsh-theme | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/boban.zsh-theme b/boban.zsh-theme index 27d20cc..3ec5309 100644 --- a/boban.zsh-theme +++ b/boban.zsh-theme @@ -146,6 +146,14 @@ prompt_tf() { fi } +# Kubectl: current active kubeconfig file +prompt_kubectl() { + local kubeconfig="$KUBECONFIG" + if [[ -n $kubeconfig ]]; then + prompt_segment magenta black "${config_name}" + fi +} + # Status: # - was there an error # - am I root @@ -174,6 +182,7 @@ build_prompt() { prompt_aws prompt_dir prompt_virtualenv + prompt_kubectl prompt_tf prompt_git prompt_end