Created
December 17, 2010 09:21
-
-
Save dameninngenn/744697 to your computer and use it in GitHub Desktop.
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 | |
precmd_vcs_info () { | |
psvar=() | |
LANG=en_US.UTF-8 vcs_info | |
if [[ -n "$vcs_info_msg_0_" ]]; then | |
alias hoge='echo "in git work dir"' | |
else | |
alias hoge='echo "not git work dir "' | |
fi | |
} | |
typeset -ga precmd_functions | |
precmd_functions+=precmd_vcs_info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment