summaryrefslogtreecommitdiff
path: root/lib/git.zsh
diff options
context:
space:
mode:
authorr3dDoX <r3dDoX@users.noreply.github.com>2014-05-26 10:47:51 +0200
committerr3dDoX <r3dDoX@users.noreply.github.com>2014-05-26 10:47:51 +0200
commit514693125b12d4b4cd099dcb09174f7bfd9a5b0e (patch)
tree06297a45fcd45e813edbbeb25e94ddfb4fb4e740 /lib/git.zsh
parent59c8fcc712556a4c0b612898073e212877c21d60 (diff)
downloadzsh-514693125b12d4b4cd099dcb09174f7bfd9a5b0e.tar.gz
zsh-514693125b12d4b4cd099dcb09174f7bfd9a5b0e.tar.bz2
zsh-514693125b12d4b4cd099dcb09174f7bfd9a5b0e.zip
added prefix/suffix variable for customizability
Diffstat (limited to 'lib/git.zsh')
-rw-r--r--lib/git.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/git.zsh b/lib/git.zsh
index d6cee37c3..a52f82de0 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -62,7 +62,8 @@ function git_prompt_ahead() {
# Gets the number of commits ahead from remote
function git_commits_ahead() {
if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
- echo "$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ')"
+ COMMITS=$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ')
+ echo "$ZSH_THEME_GIT_COMMITS_AHEAD_PREFIX$COMMITS$ZSH_THEME_GIT_COMMITS_AHEAD_SUFFIX"
fi
}