2010-05-31 17:09:45 +08:00
|
|
|
#RVM settings
|
2011-06-01 02:48:26 -04:00
|
|
|
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
2010-05-31 17:09:45 +08:00
|
|
|
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
|
|
|
|
fi
|
|
|
|
|
2011-07-06 18:58:59 -07:00
|
|
|
local R="%{$terminfo[sgr0]%}"
|
2010-05-31 17:09:45 +08:00
|
|
|
|
2011-07-06 18:58:59 -07:00
|
|
|
git_prompt_info ()
|
|
|
|
{
|
|
|
|
if [ -z "$(git_prompt__git_dir)" ]; then
|
|
|
|
GIT_PROMPT_INFO=''
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
git_prompt__branch
|
|
|
|
local cb=$GIT_PROMPT_BRANCH
|
|
|
|
|
|
|
|
git_prompt__rebase_info
|
|
|
|
cb="${cb}$GIT_PROMPT_REBASE_INFO"
|
|
|
|
|
|
|
|
local dirty
|
|
|
|
git_prompt__dirty_state
|
|
|
|
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
|
|
|
|
dirty="%{$fg[red]%}*%{$reset_color%}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
GIT_PROMPT_INFO="$dirty$R%{$fg[green]%}[$cb]$R"
|
2010-05-31 17:09:45 +08:00
|
|
|
}
|
|
|
|
|
2011-07-06 18:58:59 -07:00
|
|
|
PROMPT='$GIT_PROMPT_INFO%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b '
|