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)"