From 786b580dc9b3efb7b9b5ce1c89c87ce1f59fea59 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 13 May 2015 21:11:38 +0300 Subject: [PATCH] Only disable git terminal prompt for git fetch --- pure.zsh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pure.zsh b/pure.zsh index bbae1ab..9f0e821 100644 --- a/pure.zsh +++ b/pure.zsh @@ -83,7 +83,8 @@ prompt_pure_precmd() { # make sure working tree is not $HOME [[ "$(command git rev-parse --show-toplevel)" != "$HOME" ]] && # check check if there is anything to pull - command git -c gc.auto=0 fetch &>/dev/null && + # set GIT_TERMINAL_PROMPT=0 to disable auth prompting for git fetch (git 2.3+) + GIT_TERMINAL_PROMPT=0 command git -c gc.auto=0 fetch &>/dev/null && # check if there is an upstream configured for this branch command git rev-parse --abbrev-ref @'{u}' &>/dev/null && { local arrows='' @@ -103,9 +104,6 @@ prompt_pure_setup() { # if output doesn't end with a newline export PROMPT_EOL_MARK='' - # disable auth prompting on git 2.3+ - export GIT_TERMINAL_PROMPT=0 - prompt_opts=(cr subst percent) zmodload zsh/datetime