support to show python virtualenv
pygmalion.zsh-theme support to show python virtualenv name
This commit is contained in:
parent
ee343814b7
commit
a31c2124e4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user