mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
respect VIRTUAL_ENV_PROMPT if its value is different from the default (#1718)
This commit is contained in:
parent
b8ddcd4c17
commit
161f4c1f04
1 changed files with 5 additions and 1 deletions
|
@ -4224,7 +4224,11 @@ prompt_virtualenv() {
|
|||
msg="${_p9k__ret//\%/%%} "
|
||||
fi
|
||||
local v=${VIRTUAL_ENV:t}
|
||||
[[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]] && v=${VIRTUAL_ENV:h:t}
|
||||
if [[ $VIRTUAL_ENV_PROMPT == '('?*') ' && $VIRTUAL_ENV_PROMPT != "($v) " ]]; then
|
||||
v=$VIRTUAL_ENV_PROMPT[2,-3]
|
||||
elif [[ $v == $~_POWERLEVEL9K_VIRTUALENV_GENERIC_NAMES ]]; then
|
||||
v=${VIRTUAL_ENV:h:t}
|
||||
fi
|
||||
msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${v//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER"
|
||||
case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV in
|
||||
false)
|
||||
|
|
Loading…
Reference in a new issue