1
0
mirror of https://github.com/zsh-users/zsh synced 2024-07-05 17:18:49 +00:00

19021: in command position, try to complete directories once and once only

This commit is contained in:
Oliver Kiddle 2003-09-03 14:07:25 +00:00
parent 4284171e9e
commit 688f8b4212
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2003-09-03 Oliver Kiddle <opk@zsh.org>
* 19021: Completion/Zsh/Command/_cd: in command position,
try to complete directories once and once only
* 19019: Completion/Zsh/Command/_alias,
Completion/Zsh/Command/_unhash: only complete aliases of the
appropriate type for the alias builtin
2003-09-03 Peter Stephenson <pws@csr.com>
* 19020: Src/hashtable.c: printaliasnode was screwed up by 19014.

View File

@ -67,14 +67,15 @@ else
# Don't complete local directories in command position, that's
# already handled by _command_names (see _autocd)
[[ CURRENT -ne 1 ]] &&
[[ CURRENT -ne 1 || ( -z "$path[(r).]" && $PREFIX != */* ) ]] &&
alt=( "${cdpath+local-}directories:${cdpath+local }directory:_path_files -/" "$alt[@]" )
_alternative "$alt[@]" && ret=0
return ret
fi
_wanted directories expl directory _path_files -/ && ret=0
[[ CURRENT -ne 1 ]] && _wanted directories expl directory \
_path_files -/ && ret=0
return ret
fi