mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
add POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION
This commit is contained in:
parent
93c24c0e2c
commit
ca311575d6
1 changed files with 7 additions and 2 deletions
|
@ -1975,10 +1975,15 @@ prompt_vi_mode() {
|
|||
# Virtualenv: current working virtualenv
|
||||
# More information on virtualenv (Python):
|
||||
# https://virtualenv.pypa.io/en/latest/
|
||||
set_default POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION true
|
||||
prompt_virtualenv() {
|
||||
if [[ -n "$VIRTUAL_ENV" ]]; then
|
||||
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" 'PYTHON_ICON' 0 '' "${${${VIRTUAL_ENV:t}//\%/%%}//\\/\\\\}"
|
||||
[[ -n $VIRTUAL_ENV ]] || return
|
||||
local msg=''
|
||||
if [[ $POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION == true ]] && _p9k_python_version; then
|
||||
msg="$_P9K_RETVAL "
|
||||
fi
|
||||
msg+=${${${VIRTUAL_ENV:t}//\%/%%}//\\/\\\\}
|
||||
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" 'PYTHON_ICON' 0 '' "$msg"
|
||||
}
|
||||
|
||||
function _p9k_read_pyenv_version_file() {
|
||||
|
|
Loading…
Reference in a new issue