diff options
author | Clint Adams <clint@users.sourceforge.net> | 2002-01-27 21:57:52 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2002-01-27 21:57:52 +0000 |
commit | a92fca6f8e326d72b5041281341093473f5a1fa4 (patch) | |
tree | 14e9637c7eed00e92bfc7deaeee97630bed11038 /Completion/Zsh | |
parent | fc25322fa38b184aadefe0bd5d50e3bc06122511 (diff) | |
download | zsh-a92fca6f8e326d72b5041281341093473f5a1fa4.tar.gz zsh-a92fca6f8e326d72b5041281341093473f5a1fa4.tar.xz zsh-a92fca6f8e326d72b5041281341093473f5a1fa4.zip |
16500: don't complete executable files in the current directory if "." is not in path.
Diffstat (limited to 'Completion/Zsh')
-rw-r--r-- | Completion/Zsh/Type/_command_names | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Completion/Zsh/Type/_command_names b/Completion/Zsh/Type/_command_names index 006006348..71c3adfd2 100644 --- a/Completion/Zsh/Type/_command_names +++ b/Completion/Zsh/Type/_command_names @@ -8,9 +8,18 @@ local args defs defs=( 'commands:external command:compadd -k commands' - 'executables:executable file or directory:_path_files -/g \*\(-\*\)' ) +if [[ -n "$path[(r).]" ]]; then + defs=( "$defs[@]" + 'executables:executable file or directory:_path_files -/g \*\(-\*\)' + ) +else + defs=( "$defs[@]" + 'executables:executable file or directory:_files -P/ -W/ -/g \*\(-\*\)' + ) +fi + if [[ "$1" = -e ]]; then shift else |