From 02f87f14a974e43954f9398c7644dad84a87e3ec Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Mon, 16 Sep 2013 09:49:51 +0200 Subject: [PATCH] fix quoting and simplify upstream reference check Closes #19 --- pure.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pure.zsh b/pure.zsh index 0a48996..88123eb 100644 --- a/pure.zsh +++ b/pure.zsh @@ -61,7 +61,7 @@ prompt_pure_precmd() { # check if we're in a git repo command git rev-parse --is-inside-work-tree &>/dev/null || return # check check if there is anything to pull - command git fetch && (($(git rev-list --count HEAD...$(git rev-parse --abbrev-ref @{u})) > 0)) && + command git fetch && (( $(git rev-list --count HEAD...@'{u}' 2>/dev/null) > 0 )) && # some crazy ansi magic to inject the symbol into the previous line printf "\e[A\e[`prompt_pure_string_length $prompt_pure_preprompt`C\e[90m⇣\e[0m\n\e[2C" } &!