From e2def7f1f3d6a23ac79e46df05af4db28211c4ce Mon Sep 17 00:00:00 2001 From: Philip Hofstetter Date: Wed, 28 Dec 2011 15:03:23 +0100 Subject: [PATCH] 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 --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 805345663..14fba2be5 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -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