2 # Copyright Armaan Bhojwani 2021 <me@armaanb.net>
3 # MIT licensed, see the LICENSE file for more information.
7 zstyle ':vcs_info:git:*' formats '%f|%F{green}%b%u%c'
8 zstyle ':vcs_info:git:*' actionformats '%b|%a%u%c'
9 zstyle ':vcs_info:*' unstagedstr ' *'
10 zstyle ':vcs_info:*' stagedstr ' +'
12 ################################################################################
14 # Cursor shape depends on vi mode
15 function zle-keymap-select zle-line-init zle-line-finish {
19 print -n -- "\E]50;CursorShape=0\C-G"
23 print -n -- "\E]50;CursorShape=1\C-G"
32 PROMPT="%B%F{%(?.cyan.red)}${PROMPT_CHAR}%f%b "
33 RPROMPT="[%F{blue}%~${vcs_info_msg_0_}%f][%(?,%F{cyan}%?,%F{red}%?)%f]"
35 [[ -v PS1_NL ]] && echo || PS1_NL=
38 zstyle ':vcs_info:*' check-for-changes true
39 autoload -Uz add-zsh-hook vcs-info
40 add-zsh-hook precmd vcs_info
41 add-zsh-hook precmd set-prompt
44 zle -N zle-line-finish
45 zle -N zle-keymap-select