From 050c62d36a0286afde17e63896014d6f85a529ed Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sun, 3 Feb 2002 21:29:36 +0000 Subject: 16500, 16507: have command completion respect PATH --- Completion/Zsh/Type/_command_names | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Zsh/Type/_command_names b/Completion/Zsh/Type/_command_names index 006006348..613f1fe59 100644 --- a/Completion/Zsh/Type/_command_names +++ b/Completion/Zsh/Type/_command_names @@ -8,9 +8,13 @@ local args defs defs=( 'commands:external command:compadd -k commands' - 'executables:executable file or directory:_path_files -/g \*\(-\*\)' ) +[[ -n "$path[(r).]" || $PREFIX = */* ]] && + defs=( "$defs[@]" + 'executables:executable file or directory:_path_files -/g \*\(-\*\)' + ) + if [[ "$1" = -e ]]; then shift else -- cgit 1.4.1