From 2a1ba77bc67502c0b8e75cf37275bc58c1d423bd Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 3 Dec 1999 16:35:57 +0000 Subject: zsh-workers/8869 --- Completion/Builtins/_cd | 6 ++++-- Doc/Zsh/compsys.yo | 8 ++++++++ 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 ) -- cgit 1.4.1