From c5e645069cc43caab6dbaec0a65d7c37dfda705a Mon Sep 17 00:00:00 2001 From: lhark Date: Sat, 14 May 2016 18:45:54 +0200 Subject: [PATCH] Fix auto-update cd stack --- zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index c75232f..e602583 100644 --- a/zshrc +++ b/zshrc @@ -18,7 +18,7 @@ RC_PATH=$(dirname "$(readlink -f ${(%):-%x})") # Mise à jour automatique à partir du repo distant -CUR_PWD=`pwd` +pushd cd $RC_PATH # 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" read line 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 fi fi -cd $CUR_PWD +popd # Configuration for virtualenv