Added a function to retrieve the current git branch. Allows git prompt info when using ZSH+oh-my-zsh through Cygwin.

This commit is contained in:
Michael Sena 2014-02-06 12:32:56 +11:00
commit 00688ac163

View file

@ -7,6 +7,14 @@ function git_prompt_info() {
fi
}
git_prompt_info_quick() {
ref=$(git symbolic-ref HEAD) 2> /dev/null
if [ "${ref}" != "" ]
then
echo "git:${ref#refs/heads/}"
fi
}
# Checks if working tree is dirty
parse_git_dirty() {