Skip to content

Instantly share code, notes, and snippets.

@decaylala
Created August 18, 2012 09:44
Show Gist options
  • Save decaylala/3385691 to your computer and use it in GitHub Desktop.
Save decaylala/3385691 to your computer and use it in GitHub Desktop.
oh-my-zsh theme
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
echo '$'
}
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo `basename $VIRTUAL_ENV`
}
if which rvm-prompt &> /dev/null; then
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%} and %{$fg[red]%}$(virtualenv_info)%{$reset_color%}
$(prompt_char) '
RPROMPT='%{$fg_bold[green]%}%*%{$reset_color%}'
fi
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=""
VIRTUAL_ENV_DISABLE_PROMPT=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment