diff options
author | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2019-06-25 11:16:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 11:16:59 +0300 |
commit | b404c1b54e5c0e0ce978e4839c828171178ee824 (patch) | |
tree | c4b2643f03e377cfcb45a18c8c08d7380f115e3c /internal | |
parent | 188635f2e1cf5a9cacf2499e4230eaf4160fe154 (diff) | |
parent | fdbb830c9818e28fb790d1c665e5dd52208f16e6 (diff) |
Merge pull request #93 from MarvinTeichmann/patch-1
Make virtualenv segment configurable, similar to anaconda.
Diffstat (limited to 'internal')
-rwxr-xr-x | internal/p10k.zsh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ee67387c..2ea2e430 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -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" } |