1 function prompt_ben_precmd {
6 echo '('`rvm-prompt v p g`')'
9 function virtualenv_info {
10 if [[ -z "$VIRTUAL_ENV" ]]; then
13 venv="${VIRTUAL_ENV##*/}"
19 [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
22 function zle-line-init zle-keymap-select {
23 local return_status="%{%F{red}%}%(?..✘)%{$reset_color%}"
24 RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}${return_status}%{$reset_color%}"
29 zle -N zle-keymap-select
31 function prompt_ben_setup {
33 unsetopt XTRACE KSH_ARRAYS
34 prompt_opts=(cr percent subst)
36 # Load required functions.
37 autoload -Uz add-zsh-hook
39 # Add hook for calling git-info before each command.
40 add-zsh-hook precmd prompt_ben_precmd
42 # Set git-info parameters.
43 zstyle ':prezto:module:git:info' verbose 'yes'
44 zstyle ':prezto:module:git:info:branch' format '@%F{blue}%b%f'
45 zstyle ':prezto:module:git:info:clean' format ''
46 zstyle ':prezto:module:git:info:added' format '%{%F{green}%}!'
47 zstyle ':prezto:module:git:info:modified' format '%{%F{green}%}?'
48 zstyle ':prezto:module:git:info:untracked' format '%{%F{red}%}?'
49 zstyle ':prezto:module:git:info:keys' format \
54 %{%F{red}%}%n%{%f%}@%{%F{yellow}%}$(box_name)%{%f%} %{%B%F{green}%}${PWD/#$HOME/~}%{%f%b%}${git_info[prompt]} %{%F{black}%}$(rvm_info)$(virtualenv_info)%{%f%}
55 %(?,,%{${%B%F{white}%}[%?]%{%f%b%} )$ '
62 ZSH_THEME_GIT_PROMPT_PREFIX="@%{%F{blue}%}"
63 ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
64 ZSH_THEME_GIT_PROMPT_DIRTY="%{%F{green}%}!"
65 ZSH_THEME_GIT_PROMPT_UNTRACKED="%{%F{green}%}?"
66 ZSH_THEME_GIT_PROMPT_CLEAN=""