From 051ffa0c2e2abdf2c555171bdee82ccb6d8264f7 Mon Sep 17 00:00:00 2001 From: fredup Date: Fri, 20 Dec 2013 13:32:02 +0100 Subject: [PATCH 1/3] Run the async_run and disown in a subshell to suppress Done output --- gitprompt.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gitprompt.sh b/gitprompt.sh index b0b355e..17bb5da 100644 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -110,8 +110,10 @@ function checkUpstream() { if [[ ! -e "${FETCH_HEAD}" || -e `find "${FETCH_HEAD}" -mmin +${GIT_PROMPT_FETCH_TIMEOUT}` ]] then if [[ -n $(git remote show) ]]; then - async_run "git fetch --quiet" - disown -h + ( + async_run "git fetch --quiet" + disown -h + ) fi fi } From 00a79b0777a2c899e17614e69fdaf09b1c5261a1 Mon Sep 17 00:00:00 2001 From: ogr3 Date: Fri, 20 Dec 2013 13:52:32 +0100 Subject: [PATCH 2/3] revert --- gitprompt.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gitprompt.sh b/gitprompt.sh index 17bb5da..b0b355e 100644 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -110,10 +110,8 @@ function checkUpstream() { if [[ ! -e "${FETCH_HEAD}" || -e `find "${FETCH_HEAD}" -mmin +${GIT_PROMPT_FETCH_TIMEOUT}` ]] then if [[ -n $(git remote show) ]]; then - ( - async_run "git fetch --quiet" - disown -h - ) + async_run "git fetch --quiet" + disown -h fi fi } From e70a107295bc7315874bd5750c5fae73e9940849 Mon Sep 17 00:00:00 2001 From: ogr3 Date: Fri, 20 Dec 2013 14:06:19 +0100 Subject: [PATCH 3/3] async_run and disown in subshell when calling to suppress Done output --- gitprompt.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gitprompt.sh b/gitprompt.sh index b0b355e..17bb5da 100644 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -110,8 +110,10 @@ function checkUpstream() { if [[ ! -e "${FETCH_HEAD}" || -e `find "${FETCH_HEAD}" -mmin +${GIT_PROMPT_FETCH_TIMEOUT}` ]] then if [[ -n $(git remote show) ]]; then - async_run "git fetch --quiet" - disown -h + ( + async_run "git fetch --quiet" + disown -h + ) fi fi }