Fix kubectl prompt

This commit is contained in:
Pavle Portic 2022-04-27 17:27:11 +02:00
parent f33e1b1fb1
commit d983d93332
Signed by: TheEdgeOfRage
GPG Key ID: 66AD4BA646FBC0D2
1 changed files with 2 additions and 3 deletions

View File

@ -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
}