Created
October 20, 2011 16:58
-
-
Save guehara/1301654 to your computer and use it in GitHub Desktop.
zsh prompt with vcs_info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' formats '(%s)[%b] ' | |
zstyle ':vcs_info:*' actionformats '(%s)[%b|%a] ' | |
precmd () { | |
psvar=() | |
LANG=en_US.UTF-8 vcs_info | |
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_" | |
} | |
# prompt | |
PROMPT="[%n@${HOST%%.*} %F{green}%~%f] " | |
PROMPT2="%_%% " | |
SPROMPT="%r is correct? [n,y,a,e]: " | |
RPROMPT="%1(v|%F{yellow}%1v%f|)%T" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment