about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-03 16:35:57 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-03 16:35:57 +0000
commit2a1ba77bc67502c0b8e75cf37275bc58c1d423bd (patch)
tree1b1c67e399ae332fd885d142efce20c0153d4696
parentfc468377b8a707431357d97ff4388f360980e5bb (diff)
downloadzsh-2a1ba77bc67502c0b8e75cf37275bc58c1d423bd.tar.gz
zsh-2a1ba77bc67502c0b8e75cf37275bc58c1d423bd.tar.xz
zsh-2a1ba77bc67502c0b8e75cf37275bc58c1d423bd.zip
zsh-workers/8869
-rw-r--r--Completion/Builtins/_cd6
-rw-r--r--Doc/Zsh/compsys.yo8
2 files changed, 12 insertions, 2 deletions
diff --git a/Completion/Builtins/_cd b/Completion/Builtins/_cd
index 2203dcf15..f8b01bc66 100644
--- a/Completion/Builtins/_cd
+++ b/Completion/Builtins/_cd
@@ -33,11 +33,13 @@ elif _popd || [[ $PREFIX != (\~|/|./|../)* && $#cdpath -ne 0 ]]; then
   # Note we need a tilde because cdablevars also allows user home
   # directories, hence we also need nonomatch to suppress error messages.
   if [[ -o cdablevars && -n "$PREFIX" && ! -d ${tdir::=${PREFIX%%/*}} &&
-    -d ${~tdir2::="~$tdir"} ]]; then
+        -d ${~tdir2::="~$tdir"} ]]; then
       PREFIX="~$PREFIX"
       _path_files -/
   else
-    _path_files -W "(. $cdpath)" -/
+    _alternative \
+        'local-directories:local directories:_path_files -/' \
+	'path-directories: directories in cdpath:_path_files -W \(${cdpath:#.}\) -/'
   fi
 else
   _path_files -/
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 9517cc8d9..cddf9a976 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -622,6 +622,10 @@ for names of zsh keymaps
 item(tt(keysyms))(
 for names of X keysyms
 )
+item(tt(local-directories))(
+for names of directories in the current working directory when
+completing for the tt(cd) builtin command
+)
 item(tt(libraries))(
 for names of system libraries
 )
@@ -667,6 +671,10 @@ for packages (e.g. tt(rpm) packages)
 item(tt(parameters))(
 for names of parameters
 )
+item(tt(path-directories))(
+for names of directories in directories from the tt(cdpath) array when
+completing for the tt(cd) builtin command
+)
 item(tt(paths))(
 used to look up the values of the tt(expand) and tt(cursor) styles
 )