support to show python virtualenv

pygmalion.zsh-theme support to show python virtualenv name
This commit is contained in:
ykswang 2015-12-09 23:26:59 +08:00
parent ee343814b7
commit a31c2124e4

View File

@ -23,10 +23,19 @@ prompt_pygmalion_precmd(){
local nl=""
if [[ $prompt_length -gt 40 ]]; then
nl=$'\n%{\r%}';
if [ $prompt_length -gt 40 ]
then
nl=$'\n%{\r%}'
fi
PROMPT="$base_prompt$gitinfo$nl$post_prompt"
if [ ${#VIRTUAL_ENV} -gt 3 ]
then
venv=$' %{$fg[blue]%}[${VIRTUAL_ENV:t}]%{$reset_color%} '
else
venv=$''
fi
PROMPT="$base_prompt$gitinfo$nl$venv$post_prompt"
}
prompt_setup_pygmalion