Skip to content

Instantly share code, notes, and snippets.

@julienXX
Created February 8, 2011 16:32
Show Gist options
  • Save julienXX/816699 to your computer and use it in GitHub Desktop.
Save julienXX/816699 to your computer and use it in GitHub Desktop.
function prompt_char {
git branch >/dev/null 2>/dev/null && echo ' [±] ' && return
hg root >/dev/null 2>/dev/null && echo ' [☿] ' && return
echo ' [○] '
}
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function ruby_prompt_info {
(~/.rvm/bin/rvm-prompt)
}
PROMPT='
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}
%{$fg_bold[grey]%}$(ruby_prompt_info)$(prompt_char)%{$reset_color%} => '
RPROMPT='[$(git_prompt_info)]'
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
ZSH_THEME_GIT_PROMPT_CLEAN=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment