From 268e264849a424087cb1abd0b22e81b6357c5c35 Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Fri, 8 Jan 2016 15:58:57 -0500 Subject: [PATCH] Use builtin cd, fixes #56, enhancd compatability --- k.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k.sh b/k.sh index 55cb324..69fb338 100644 --- a/k.sh +++ b/k.sh @@ -285,8 +285,8 @@ k () { GIT_TOPLEVEL='' else if (( IS_DIRECTORY )); - then cd -q $NAME 2>/dev/null || cd -q - >/dev/null && IS_GIT_REPO=0 #Say no if we don't have permissions there - else cd -q $NAME:a:h 2>/dev/null || cd -q - >/dev/null && IS_GIT_REPO=0 + then builtin cd -q $NAME 2>/dev/null || builtin cd -q - >/dev/null && IS_GIT_REPO=0 #Say no if we don't have permissions there + else builtin cd -q $NAME:a:h 2>/dev/null || builtin cd -q - >/dev/null && IS_GIT_REPO=0 fi if [[ $(command git rev-parse --is-inside-work-tree 2>/dev/null) == true ]]; then IS_GIT_REPO=1 @@ -294,7 +294,7 @@ k () { else IS_GIT_REPO=0 fi - cd -q - >/dev/null + builtin cd -q - >/dev/null fi # Get human readable output if necessary