From 9b01e90bbc1384e9cba706c20c90a369002efdb6 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 9 Sep 2012 23:30:44 +0900 Subject: [PATCH] fix cd --- bashrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bashrc b/bashrc index e047263..0faafc7 100755 --- a/bashrc +++ b/bashrc @@ -216,15 +216,15 @@ cd(){ if test $# -eq 0 then pushd ~/ >/dev/null - elif ! test -d "$1" - then - echo `basename ${SHELL}`: cd: "$1": No such file or directory 2>&1 - return 1 elif test $1 = - then local pwd="$PWD" popd >/dev/null pushd -n "$pwd" >/dev/null # stack last dir + elif ! test -d "$1" + then + echo `basename ${SHELL}`: cd: "$1": No such file or directory 2>&1 + return 1 else pushd "$1" >/dev/null fi