about summary refs log tree commit diff
path: root/Completion/Builtins/_cd
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-17 09:56:32 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-17 09:56:32 +0000
commit77c1b9a3d42d1453182cf6882c548d096ac2ad83 (patch)
tree42c0ca1dfbc1974d87ca26c585fb1e49498f4bb5 /Completion/Builtins/_cd
parent665b54c9e4f145c5fe2f448f96270669b40eb6cf (diff)
downloadzsh-77c1b9a3d42d1453182cf6882c548d096ac2ad83.tar.gz
zsh-77c1b9a3d42d1453182cf6882c548d096ac2ad83.tar.xz
zsh-77c1b9a3d42d1453182cf6882c548d096ac2ad83.zip
zsh-workers/7903
Diffstat (limited to 'Completion/Builtins/_cd')
-rw-r--r--Completion/Builtins/_cd2
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Builtins/_cd b/Completion/Builtins/_cd
index 35940d1fe..d0ba62f2f 100644
--- a/Completion/Builtins/_cd
+++ b/Completion/Builtins/_cd
@@ -67,7 +67,7 @@ elif [[ $PREFIX != (\~|/|./|../)* && $#cdpath -ne 0 ]]; then
   # variable names, but it hardly seems worth it.
   # Note we need a tilde because cdablevars also allows user home
   # directories, hence we also need nonomatch to suppress error messages.
-  if [[ -o cdablevars && ! -d ${tdir::=${PREFIX%%/*}} &&
+  if [[ -o cdablevars && -n "$PREFIX" && ! -d ${tdir::=${PREFIX%%/*}} &&
     -d ${~tdir2::="~$tdir"} ]]; then
       PREFIX="~$PREFIX"
       _path_files -/