From 1b4c0b59b4245a02b804dbe647dd97e7ec17ddfe Mon Sep 17 00:00:00 2001 From: Bryan Jowers Date: Tue, 25 Sep 2012 19:18:00 -0500 Subject: [PATCH] Fix. --- zsh/prompt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zsh/prompt b/zsh/prompt index f1be9a4..44c9c14 100755 --- a/zsh/prompt +++ b/zsh/prompt @@ -143,19 +143,19 @@ function updateprompt () { if [[ -n ${remote} ]] ; then # for git prior to 1.7 # ahead=$(git rev-list origin/${hook_com[branch]}..HEAD | wc -l) - local ahead="$(git rev-list ${branch}@{upstream}..HEAD 2>/dev/null | wc -l)" + local ahead="$(git rev-list ${branch}@{upstream}..HEAD 2>/dev/null | wc -l | xargs)" gitstatus+=( "${GREEN}+${ahead}${GRAY}" ) # for git prior to 1.7 # behind=$(git rev-list HEAD..origin/${hook_com[branch]} | wc -l) - local behind="$(git rev-list HEAD..${branch}@{upstream} 2>/dev/null | wc -l)" + local behind="$(git rev-list HEAD..${branch}@{upstream} 2>/dev/null | wc -l | xargs)" gitstatus+=( "${RED}-${behind}${GRAY}" ) remotepart="${RESETCOLOR}${GRAY}[${remote} ${(j:/:)gitstatus}]${RESETCOLOR}" fi local stashpart="" if [[ -s ${gitdir}/refs/stash ]] ; then - stashes=$(git stash list 2>/dev/null | wc -l) + stashes="$(git stash list 2>/dev/null | wc -l | xargs)" stashpart="${RESETCOLOR}${GRAY}(${GREEN}${stashes}${GRAY} stashed)${RESETCOLOR}" fi local stats="$(git_prompt_status)"