mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-26 00:41:57 +00:00
add POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV
This commit is contained in:
parent
fdac99c57c
commit
00d2cc7237
1 changed files with 7 additions and 2 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue