mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Add python virtualenv to gallois theme
This commit is contained in:
parent
d485044169
commit
3de6a4866e
1 changed files with 12 additions and 9 deletions
|
|
@ -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 '
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue