Skip to content

Commit

Permalink
Merge pull request #93 from MarvinTeichmann/patch-1
Browse files Browse the repository at this point in the history
Make virtualenv segment configurable, similar to anaconda.
  • Loading branch information
romkatv authored Jun 25, 2019
2 parents 188635f + fdbb830 commit b404c1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/p10k.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1944,13 +1944,15 @@ prompt_vi_mode() {
# More information on virtualenv (Python):
# https://virtualenv.pypa.io/en/latest/
set_default POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION true
set_default POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER "("
set_default POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER ")"
prompt_virtualenv() {
[[ -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}//\%/%%}
msg+="$POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${${VIRTUAL_ENV:t}//\%/%%}$POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER"
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" 'PYTHON_ICON' 0 '' "$msg"
}

Expand Down

0 comments on commit b404c1b

Please sign in to comment.