mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-12 19:18:28 +02:00
allow patterns in POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES; see #686
This commit is contained in:
parent
3688d12857
commit
30457e2be6
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user