diff --git a/lib/git.zsh b/lib/git.zsh index 926fd7985..7bc85819b 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -85,7 +85,7 @@ function git_commits_ahead() { # Gets the number of commits behind remote function git_commits_behind() { - if git rev-parse --git-dir > /dev/null 2>&1; then + if $(command git rev-parse --git-dir > /dev/null 2>&1); then echo $(git rev-list --count $(current_branch)..$(git rev-parse --abbrev-ref --symbolic-full-name @{u})) fi }