Created
August 16, 2016 06:21
-
-
Save Shinpeim/eb1ca8d55ae9793e20a13f5bf88630d0 to your computer and use it in GitHub Desktop.
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 '[%r - %b](%s)' | |
zstyle ':vcs_info:*' actionformats '(%s)-[%r - %b|%a]' | |
precmd () { | |
psvar=() | |
LANG=en_US.UTF-8 vcs_info | |
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_ " | |
psvar[2]=$(date +'%m/%d %H:%M:%S'); | |
} | |
PS_OK=$'\n''%1(v|%F{green}%1v%f|)%F{green}[CURRENT=%~] %F{white}[%2v]'$'\n%F{white} %F{green}✔ %f' | |
PS_NG=$'\n''%1(v|%F{red}%1v%f|)%F{red}[CURRENT=%~] %F{white}[%2v]'$'\n%F{white} %F{red}✘ %f' | |
PROMPT="%0(?|${PS_OK}|${PS_NG})" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment