]> git.r.bdr.sh - rbdr/dotfiles/blob - ben-prose.zsh-theme
Local vim/zsh changes
[rbdr/dotfiles] / ben-prose.zsh-theme
1 if [ "x$OH_MY_ZSH_HG" = "x" ]; then
2 OH_MY_ZSH_HG="hg"
3 fi
4
5 function rvm_info {
6 echo '('`rvm-prompt`') '
7 }
8
9 function hg_prompt_info {
10 $OH_MY_ZSH_HG prompt --angle-brackets "\
11 < on %{$fg[magenta]%}<branch>%{$reset_color%}>\
12 < at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
13 %{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
14 patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
15 }
16
17 function box_name {
18 [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
19 }
20
21 PROMPT='
22 %{$fg[red]%}%n%{$reset_color%} at %{$fg[yellow]%}$(box_name)%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) %{$fg[black]%}$(rvm_info)%{$reset_color%}
23 %(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ '
24
25 ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[blue]%}"
26 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
27 ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
28 ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
29 ZSH_THEME_GIT_PROMPT_CLEAN=""
30
31 local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}"
32 RPROMPT='${return_status}%{$reset_color%}'