aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-05-18 07:56:46 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-05-18 07:58:24 +0300
commit00d2cc7237d315f29a9be6f4cb2f5864242c548f (patch)
treefc3def03fb923f3249a2f201c4b89ae845b7ac27 /internal
parentfdac99c57cb1c1ea27319f7e405b73af5c3a3c82 (diff)
add POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV
Diffstat (limited to 'internal')
-rw-r--r--internal/p10k.zsh9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 11433d8d..855753e1 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -4001,7 +4001,11 @@ prompt_virtualenv() {
local v=${VIRTUAL_ENV: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"
+ if (( _POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV )); then
+ _p9k_prompt_segment "$0" "blue" "$_p9k_color1" 'PYTHON_ICON' 0 '' "$msg"
+ else
+ _p9k_prompt_segment "$0" "blue" "$_p9k_color1" 'PYTHON_ICON' 0 '${(M)${#P9K_PYENV_PYTHON_VERSION}:#0}' "$msg"
+ fi
}
_p9k_prompt_virtualenv_init() {
@@ -7008,6 +7012,7 @@ _p9k_init_params() {
_p9k_declare -e POWERLEVEL9K_VI_VISUAL_MODE_STRING
# OVERWRITE mode is shown as INSERT unless POWERLEVEL9K_VI_OVERWRITE_MODE_STRING is explicitly set.
_p9k_declare -e POWERLEVEL9K_VI_OVERWRITE_MODE_STRING
+ _p9k_declare -b POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV 1
_p9k_declare -b POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION 1
_p9k_declare -e POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER "("
_p9k_declare -e POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER ")"
@@ -7620,7 +7625,7 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit
fi
- _p9k__param_pat=$'v84\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
+ _p9k__param_pat=$'v85\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+=$'$GITSTATUS_CACHE_DIR\1\1${ZLE_RPROMPT_INDENT:-1}\1$__p9k_ksh_arrays\1'