2011-12-12 15:55:07 -07:00
|
|
|
function prompt_char {
|
|
|
|
git branch >/dev/null 2>/dev/null && echo '±' && return
|
|
|
|
hg root >/dev/null 2>/dev/null && echo 'Hg' && return
|
|
|
|
echo '○'
|
|
|
|
}
|
|
|
|
|
|
|
|
function virtualenv_info {
|
2016-10-10 11:33:40 -07:00
|
|
|
[[ -n "$VIRTUAL_ENV" ]] && echo '('${VIRTUAL_ENV:t}') '
|
2011-12-12 15:55:07 -07:00
|
|
|
}
|
|
|
|
|
2015-11-06 15:20:11 -07:00
|
|
|
PROMPT='%F{magenta}%n%f at %F{yellow}%m%f in %B%F{green}%~%f%b$(git_prompt_info)$(ruby_prompt_info)
|
2016-10-10 11:33:40 -07:00
|
|
|
$(virtualenv_info) $(prompt_char) '
|
2011-12-12 15:55:07 -07:00
|
|
|
|
2016-10-10 11:33:40 -07:00
|
|
|
ZSH_THEME_GIT_PROMPT_PREFIX=' on %F{magenta}'
|
|
|
|
ZSH_THEME_GIT_PROMPT_SUFFIX='%f'
|
|
|
|
ZSH_THEME_GIT_PROMPT_DIRTY='%F{green}!'
|
|
|
|
ZSH_THEME_GIT_PROMPT_UNTRACKED='%F{green}?'
|
|
|
|
ZSH_THEME_GIT_PROMPT_CLEAN=''
|
2011-12-12 15:55:07 -07:00
|
|
|
|
2016-10-10 11:33:40 -07:00
|
|
|
ZSH_THEME_RUBY_PROMPT_PREFIX=' using %F{red}'
|
|
|
|
ZSH_THEME_RUBY_PROMPT_SUFFIX='%f'
|