From 5c9b82d6b5af3146cf33d3042d9d3f99592934a8 Mon Sep 17 00:00:00 2001 From: lhark Date: Tue, 9 Jun 2015 12:49:03 +0200 Subject: [PATCH] Network error message now working --- zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index d780b60..60cab85 100644 --- a/zshrc +++ b/zshrc @@ -15,9 +15,9 @@ export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:~/bin # Mise à jour automatique à partir du repo distant cd /home/$USER/rc # In case the network is down, don't lock the terminal -timeout 3 git fetch -if [ $? = 124 ] then - echo "Unable to reach $(git remote -v)" +timeout 3 git fetch > /dev/null 2>&1 +if [ "$?" -ge "124" ]; then + echo "Unable to reach $(git remote -v | grep "fetch")" fi git_st=$(command git status --porcelain -b 2> /dev/null) if $(echo "$git_st" | grep '^## .*ahead' &> /dev/null); then