1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-22 11:51:04 +02:00

Completion for AUTO_CD.

This commit is contained in:
Bart Schaefer 2001-06-21 09:33:15 +00:00
parent f256c16efe
commit 5470c1fe38
4 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,10 @@
2001-06-21 Bart Schaefer <schaefer@zsh.org>
* 15020: Completion/Zsh/Command/_cd, Completion/Zsh/Context/_autocd,
Completion/Zsh/Type/_command_names: When AUTO_CD is set, complete
directory names (including along cdpath) as well as commands when
in command position.
* 15018: Completion/compinit: Fix exit status of compdef.
2001-06-20 Bart Schaefer <schaefer@zsh.org>

View File

@ -24,7 +24,7 @@ if [[ CURRENT -eq 3 ]]; then
rep=(${${rep#${PWD%%$words[2]*}}%${PWD#*$words[2]}})
(( $#rep )) && _wanted -C replacement strings expl replacement compadd -a rep
else
_directory_stack && ret=0
[[ CURRENT -gt 1 ]] && _directory_stack && ret=0
if [[ $PREFIX != (\~|/|./|../)* && $#cdpath -ne 0 ]]; then
local tdir tdir2

View File

@ -0,0 +1,5 @@
#compdef -command-
_command_names
local ret=$?
[[ -o autocd ]] && _cd || return ret

View File

@ -1,4 +1,4 @@
#compdef -command-
#autoload
# The option `-e' if given as the first argument says that we should
# complete only external commands and executable files. This and a