1 autoload
-Uz promptinit
&& promptinit
3 if [[ "$TERM" == (dumb
|linux
|*bsd
*) ]] || (( $#prompt_argv < 1 )); then
11 function zle
-line-init zle
-keymap-select {
13 # Couldn't figure out how to get tmux and iTerm to agree on how to render
14 # these characters... so there you go.
16 local normal_symbol
="N"
17 local insert_symbol
="I"
18 local error_symbol
="X"
20 # Show vi status / return status on the right side
22 local return_status
="%{%F{red}%}%(?.. $error_symbol)%{$reset_color%}"
23 if [ $KEYMAP = 'vicmd' ]; then
24 local edit_status
="%{%F{cyan}%}$normal_symbol"
26 local edit_status
="%{%F{green}%}$insert_symbol"
29 RPROMPT
="${edit_status}${return_status}%{$reset_color%}"
33 zle
-N zle
-keymap-select
39 function prompt_setup
{
41 unsetopt XTRACE KSH_ARRAYS
42 prompt_opts
=(cr percent subst
)
44 # Load required functions.
45 autoload
-Uz add
-zsh-hook
49 %{%F{black}%}$(env_info) $(node_info) $(rust_info) $(python_info)
50 %{%F{magenta}%}%n%{%f%}@%{%F{yellow}%}$(hostname -s)%{%f%} %{%B%F{green}%}${PWD/#$HOME/~}%{%f%b%}$(git_info)%{%f%}
51 %(?,,%{${%B%F{white}%}[%?]%{%f%b%} )%% '
57 setopt TRANSIENT_RPROMPT