1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00

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

Fixes #10562
This commit is contained in:
Marc Cornellà 2022-01-04 11:38:53 +01:00
parent a7c46d0ebd
commit 31d63ea884
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -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/%/%%}}"
}