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=""
|
local nl=""
|
||||||
|
|
||||||
if [[ $prompt_length -gt 40 ]]; then
|
if [ $prompt_length -gt 40 ]
|
||||||
nl=$'\n%{\r%}';
|
then
|
||||||
|
nl=$'\n%{\r%}'
|
||||||
fi
|
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
|
prompt_setup_pygmalion
|
||||||
|
Loading…
Reference in New Issue
Block a user