From d983d93332ea195326a03bbdee08692b81a8f4a1 Mon Sep 17 00:00:00 2001 From: Pavle Portic Date: Wed, 27 Apr 2022 17:27:11 +0200 Subject: [PATCH] Fix kubectl prompt --- boban.zsh-theme | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/boban.zsh-theme b/boban.zsh-theme index 3ec5309..f13214c 100644 --- a/boban.zsh-theme +++ b/boban.zsh-theme @@ -148,9 +148,8 @@ prompt_tf() { # Kubectl: current active kubeconfig file prompt_kubectl() { - local kubeconfig="$KUBECONFIG" - if [[ -n $kubeconfig ]]; then - prompt_segment magenta black "${config_name}" + if [[ -n $KUBECONFIG ]]; then + prompt_segment magenta black "$(basename $KUBECONFIG)" fi }