diff options
Diffstat (limited to 'Completion/Builtins')
-rw-r--r-- | Completion/Builtins/_cd | 6 |
1 files changed, 4 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 -/ |