]> git.r.bdr.sh - rbdr/dotfiles/blob - ben-prose.zsh-theme
Merge branch 'master' of github.com:benbeltran/dotfiles
[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 box_name {
10 [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
11 }
12
13 function zle-line-init zle-keymap-select {
14 local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}"
15 RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}${return_status}%{$reset_color%}"
16 RPS2=$RPS1
17 zle reset-prompt
18 }
19 zle -N zle-line-init
20 zle -N zle-keymap-select
21
22 PROMPT='
23 %{$fg[red]%}%n%{$reset_color%} at %{$fg[yellow]%}$(box_name)%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) %{$fg[black]%}$(rvm_info)%{$reset_color%}
24 %(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ '
25
26 ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[blue]%}"
27 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
28 ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
29 ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
30 ZSH_THEME_GIT_PROMPT_CLEAN=""
31