From 05ca6beaf4db8aa70bfdde3881164c01c73dfc30 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Mon, 16 Sep 2013 10:03:14 +0200 Subject: [PATCH] Use `command` for git and silence `git fetch` --- pure.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pure.zsh b/pure.zsh index 88123eb..1f9174d 100644 --- a/pure.zsh +++ b/pure.zsh @@ -59,9 +59,10 @@ prompt_pure_precmd() { # check async if there is anything to pull { # check if we're in a git repo - command git rev-parse --is-inside-work-tree &>/dev/null || return + command git rev-parse --is-inside-work-tree &>/dev/null && # check check if there is anything to pull - command git fetch && (( $(git rev-list --count HEAD...@'{u}' 2>/dev/null) > 0 )) && + command git fetch &>/dev/null && + (( $(command 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" } &!