diff --git a/plugins/kubectx/kubectx.plugin.zsh b/plugins/kubectx/kubectx.plugin.zsh index af9a17ef1..1419f102f 100644 --- a/plugins/kubectx/kubectx.plugin.zsh +++ b/plugins/kubectx/kubectx.plugin.zsh @@ -1,4 +1,4 @@ -typeset -A kubectx_mapping +typeset -g -A kubectx_mapping function kubectx_prompt_info() { (( $+commands[kubectl] )) || return @@ -7,5 +7,5 @@ function kubectx_prompt_info() { # use value in associative array if it exists # otherwise fall back to the context name - echo "${${kubectx_mapping[$current_ctx]:-$current_ctx}:gs/%/%%}" + echo "${kubectx_mapping[$current_ctx]:-${current_ctx:gs/%/%%}}" }