From 1caeaff967a7576c92434ee4f1524f3630de0e30 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Tue, 12 Apr 2016 09:46:35 -0400 Subject: Use pushd and popd in chdir function --- .bashrc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.bashrc b/.bashrc index 3df8f26..75246bb 100644 --- a/.bashrc +++ b/.bashrc @@ -339,10 +339,14 @@ function chdir() { if [ $# -eq 0 ]; then - cd - + #cd - + echo -n "popd: " + popd else - cd $@ - pwd + #cd $@ + #pwd + echo -n "pushd: " + pushd $@ fi } @@ -360,7 +364,7 @@ alias hadd='run_cmd $(history -p ^diff^add)' alias dogs='run_cmd docker ps; run_cmd docker logs -f $(docker ps|sed 1d|awk '"'"'{print $1;}'"'"')' alias undock='sudo umount `mount|grep -o "/var/lib/docker/aufs/mnt/[a-z0-9]*"`' -alias gp="chdir ${VIEW_DIR} ; run_cmd git pull ; chdir" +#alias gp="chdir ${VIEW_DIR} ; run_cmd git pull ; chdir" function esvapi() -- cgit 1.4.1-2-gfad0