1 autoload
-Uz promptinit
&& promptinit
3 if [[ "$TERM" == (dumb
|linux
|*bsd
*) ]] || (( $#prompt_argv < 1 )); then
11 function prompt_precmd
{
19 function virtualenv_info
{
20 if [[ -z "$VIRTUAL_ENV" ]]; then
23 venv
="${VIRTUAL_ENV##*/}"
29 if [[ -z "$RUBY_VERSION" ]]; then
38 if [[ -z "$NVM_BIN" ]]; then
47 [ -f ~
/.box
-name ] && cat ~
/.box
-name || hostname
-s
54 function zle
-line-init zle
-keymap-select {
55 local return_status
="%{%F{red}%}%(?..🆇)%{$reset_color%}"
56 if [ $KEYMAP = 'vicmd' ]; then
57 local edit_status
="%{%F{cyan}%}🅽"
59 local edit_status
="%{%F{green}%}🅸"
62 RPS1
="${edit_status} ${return_status}%{$reset_color%}"
67 zle
-N zle
-keymap-select
73 function prompt_setup
{
75 unsetopt XTRACE KSH_ARRAYS
76 prompt_opts
=(cr percent subst
)
78 # Load required functions.
79 autoload
-Uz add
-zsh-hook
81 # Add hook for calling git-info before each command.
82 add
-zsh-hook precmd prompt_precmd
84 # Set git-info parameters.
85 zstyle
':git:info' verbose
'no'
86 zstyle
':git:info:branch' format
'@%F{cyan}%b%f'
87 zstyle
':git:info:clean' format
''
88 zstyle
':git:info:added' format
'%{%F{green}%}!'
89 zstyle
':git:info:modified' format
'%{%F{green}%}?'
90 zstyle
':git:info:untracked' format
'%{%F{magenta}%}?'
91 zstyle
':git:info:keys' format \
96 %{%F{black}%}$(nvm_info) $(rvm_info) $(virtualenv_info)
97 %{%F{magenta}%}%n%{%f%}@%{%F{yellow}%}$(box_name)%{%f%} %{%B%F{green}%}${PWD/#$HOME/~}%{%f%b%}${git_info[prompt]} %{%f%}
98 %(?,,%{${%B%F{white}%}[%?]%{%f%b%} )$ '