Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 22 lines (18 sloc) 0.741 kb
07cee28 @gallois added custom theme, based on eastwood
gallois authored
1 ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
2 ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
3 ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
4 ZSH_THEME_GIT_PROMPT_CLEAN=""
5
6 #Customized git status, oh-my-zsh currently does not allow render dirty status before branch
7 git_custom_status() {
8 local cb=$(current_branch)
9 if [ -n "$cb" ]; then
10 echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
11 fi
12 }
13
14 #RVM and git settings
15 if [[ -s ~/.rvm/scripts/rvm ]] ; then
16 RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1'
bf2c55a @benlumley Gallois theme - made the git branch/status show for those of us witho…
benlumley authored
17 else
18 RPS1='$(git_custom_status) $EPS1'
07cee28 @gallois added custom theme, based on eastwood
gallois authored
19 fi
20
21 PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '
Something went wrong with that request. Please try again.