Created
September 8, 2012 12:42
-
-
Save Osse/3674560 to your computer and use it in GitHub Desktop.
vcs info hack
This file contains hidden or 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
function precmd() { | |
if [[ -z $(git ls-files --others --exclude-standard 2> /dev/null) ]] { | |
zstyle ':vcs_info:*' formats '%F{72}[%b%c%u%F{72}]%f' | |
} else { | |
zstyle ':vcs_info:*' formats '%F{72}[%b%c%u%F{red}•%F{72}]%f' | |
} | |
vcs_info | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment