Add python virtualenv to gallois theme

This commit is contained in:
Oleg Kandaurov 2014-01-10 15:38:17 +04:00
commit 3de6a4866e

View file

@ -11,15 +11,18 @@ git_custom_status() {
fi fi
} }
#RVM and git settings function gallois_virtualenv_info {
if [[ -s ~/.rvm/scripts/rvm ]] ; then [ $VIRTUAL_ENV ] && echo "[`basename $VIRTUAL_ENV`]"
RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1' }
else
if which rbenv &> /dev/null; then function gallois_ruby_info {
RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1' if [[ -s ~/.rvm/scripts/rvm ]] ; then
else echo "[`~/.rvm/bin/rvm-prompt`]"
RPS1='$(git_custom_status) $EPS1' elif which rbenv &> /dev/null; then
echo "[`rbenv version | sed -e "s/ (set.*$//"`]"
fi fi
fi }
RPS1='$(git_custom_status)%{$fg[red]%}`gallois_ruby_info`%{$fg[yellow]%}`gallois_virtualenv_info`%{$reset_color%} $EPS1'
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b ' PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '