From 91cbf1a326444dbdbdd01926cefecd5a61da37aa Mon Sep 17 00:00:00 2001 From: rupa Date: Wed, 20 Jul 2016 19:57:46 -0400 Subject: [PATCH] Use builtin cd in case you've messed with it. --- z.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/z.sh b/z.sh index 2ab0915..c23e51b 100644 --- a/z.sh +++ b/z.sh @@ -125,7 +125,7 @@ _z() { # if we hit enter on a completion just go there case "$last" in # completions will always start with / - /*) [ -z "$list" -a -d "$last" ] && cd "$last" && return;; + /*) [ -z "$list" -a -d "$last" ] && builtin cd "$last" && return;; esac # no file yet @@ -202,7 +202,7 @@ _z() { } ')" - [ $? -eq 0 ] && [ "$cd" ] && ${echo:-cd} "$cd" + [ $? -eq 0 ] && [ "$cd" ] && ${echo:-builtin cd} "$cd" fi }