]> git.r.bdr.sh - rbdr/dotfiles/blame - ben-prose.zsh-theme
Update the stuff
[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
64bb1bce
BB
21function zle-line-init zle-keymap-select {
22 local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}"
23 RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}${return_status}%{$reset_color%}"
24 RPS2=$RPS1
25 zle reset-prompt
26}
27zle -N zle-line-init
28zle -N zle-keymap-select
29
9041bd93
BB
30PROMPT='
31%{$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%}
32%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ '
33
34ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[blue]%}"
35ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
36ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
37ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
38ZSH_THEME_GIT_PROMPT_CLEAN=""
39