]> git.r.bdr.sh - rbdr/dotfiles/blame - ben-prose.zsh-theme
Add Zshrc and my zsh-theme
[rbdr/dotfiles] / ben-prose.zsh-theme
CommitLineData
9041bd93
BB
1if [ "x$OH_MY_ZSH_HG" = "x" ]; then
2 OH_MY_ZSH_HG="hg"
3fi
4
5function rvm_info {
6 echo '('`rvm-prompt`') '
7}
8
9function 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%}<
14patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
15}
16
17function box_name {
18 [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
19}
20
21PROMPT='
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
25ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[blue]%}"
26ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
27ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
28ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
29ZSH_THEME_GIT_PROMPT_CLEAN=""
30
31local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}"
32RPROMPT='${return_status}%{$reset_color%}'