use git_prompt_ahead in git_prompt_info

now that git_prompt_ahead() works more consistenly and doesn't insist on
the remote being called 'origin', we can actually include
git_prompt_ahead() in the default prompt.

git_prompt_ahead() makes use of ZSH_THEME_GIT_PROMPT_AHEAD which is
currently unused, but can now be used to show if your branch is ahead of
the one you are tracking
This commit is contained in:
Philip Hofstetter 2011-12-28 15:03:23 +01:00
commit e2def7f1f3

View file

@ -1,7 +1,7 @@
# get the name of the branch we are on
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$(git_prompt_ahead)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
# Checks if working tree is dirty