Fix auto-update cd stack
This commit is contained in:
parent
fe0dd6ab61
commit
c5e645069c
1 changed files with 3 additions and 3 deletions
6
zshrc
6
zshrc
|
@ -18,7 +18,7 @@ RC_PATH=$(dirname "$(readlink -f ${(%):-%x})")
|
||||||
|
|
||||||
# Mise à jour automatique à partir du repo distant
|
# Mise à jour automatique à partir du repo distant
|
||||||
|
|
||||||
CUR_PWD=`pwd`
|
pushd
|
||||||
cd $RC_PATH
|
cd $RC_PATH
|
||||||
|
|
||||||
# In case the network is down, don't lock the terminal
|
# In case the network is down, don't lock the terminal
|
||||||
|
@ -37,12 +37,12 @@ elif $(echo "$git_st" | grep '^## .*behind' &> /dev/null); then
|
||||||
echo "Type Y to update .zshrc: \c"
|
echo "Type Y to update .zshrc: \c"
|
||||||
read line
|
read line
|
||||||
if [ "$line" = Y ] || [ "$line" = y ]; then
|
if [ "$line" = Y ] || [ "$line" = y ]; then
|
||||||
git pull --rebase --stat origin master && source $HOME/.zshrc && cd $CUR_PWD
|
git pull --rebase --stat origin master && source $HOME/.zshrc && popd
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $CUR_PWD
|
popd
|
||||||
|
|
||||||
|
|
||||||
# Configuration for virtualenv
|
# Configuration for virtualenv
|
||||||
|
|
Loading…
Reference in a new issue