summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-05-05 12:52:36 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-05-05 12:52:36 +0300
commit30457e2be68d1c325e17e8a73d448622655b7ffe (patch)
tree93475a729a63b76cc855d037a3f0110cb4586a1d /internal
parent3688d12857ac884f8ccacfd7a68cff031811e100 (diff)
allow patterns in POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES; see #686
Diffstat (limited to 'internal')
-rw-r--r--internal/p10k.zsh5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 5e8683e1..d28b2ac3 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3999,7 +3999,7 @@ prompt_virtualenv() {
msg="${_p9k__ret//\%/%%} "
fi
local v=${VIRTUAL_ENV:t}
- (( _POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES[(I)$v] )) && v=${VIRTUAL_ENV:h:t}
+ [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]] && v=${VIRTUAL_ENV:h:t}
msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER"
_p9k_prompt_segment "$0" "blue" "$_p9k_color1" 'PYTHON_ICON' 0 '' "$msg"
}
@@ -6991,6 +6991,7 @@ _p9k_init_params() {
_p9k_declare -e POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER "("
_p9k_declare -e POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER ")"
_p9k_declare -a POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES -- virtualenv venv .venv env
+ _POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES="${(j.|.)_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES}"
_p9k_declare -b POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION 1
_p9k_declare -e POWERLEVEL9K_NODEENV_LEFT_DELIMITER "["
_p9k_declare -e POWERLEVEL9K_NODEENV_RIGHT_DELIMITER "]"
@@ -7598,7 +7599,7 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit
fi
- _p9k__param_pat=$'v80\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
+ _p9k__param_pat=$'v81\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
_p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays\1'