Use builtin cd in case you've messed with it.

This commit is contained in:
rupa committed 2016-07-20 19:57:46 -04:00
1 parent 9dafe447af
commit 91cbf1a326
1 file changed
+2 -2
+2 -2
View File
@@ -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
}