From 2b7682cf9d1a0bb8b143a7c0946cfeb38053bc42 Mon Sep 17 00:00:00 2001 From: lhark Date: Tue, 9 Jun 2015 11:49:53 +0200 Subject: [PATCH] Adds remote unreachable message --- zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zshrc b/zshrc index 11bbd87..d780b60 100644 --- a/zshrc +++ b/zshrc @@ -16,6 +16,9 @@ export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:~/bin 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)" +fi git_st=$(command git status --porcelain -b 2> /dev/null) if $(echo "$git_st" | grep '^## .*ahead' &> /dev/null); then echo"You have unpushed business in /home/$USER/rc"