Adds remote unreachable message
This commit is contained in:
parent
89bff23c25
commit
2b7682cf9d
1 changed files with 3 additions and 0 deletions
3
zshrc
3
zshrc
|
@ -16,6 +16,9 @@ export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:~/bin
|
||||||
cd /home/$USER/rc
|
cd /home/$USER/rc
|
||||||
# In case the network is down, don't lock the terminal
|
# In case the network is down, don't lock the terminal
|
||||||
timeout 3 git fetch
|
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)
|
git_st=$(command git status --porcelain -b 2> /dev/null)
|
||||||
if $(echo "$git_st" | grep '^## .*ahead' &> /dev/null); then
|
if $(echo "$git_st" | grep '^## .*ahead' &> /dev/null); then
|
||||||
echo"You have unpushed business in /home/$USER/rc"
|
echo"You have unpushed business in /home/$USER/rc"
|
||||||
|
|
Loading…
Reference in a new issue