fix(kubectx): allow prompt sequences in `kubectx_mapping` (#10562)

Fixes #10562
parent a7c46d0e
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/%/%%}}"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment