Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _command_names and path
- X-seq: zsh-workers 16500
- From: Clint Adams <clint@xxxxxxx>
- To: Sven Wischnowsky <wischnow@xxxxxxxxx>
- Subject: Re: _command_names and path
- Date: Sun, 27 Jan 2002 15:43:11 -0500
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <15437.17263.353779.491314@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20020121172829.GB6491@xxxxxxxx> <15437.17263.353779.491314@xxxxxxxxxxxxxxxxxx>
> Probably changing _command_names to use `_files -P/ -W/ ...' if `.' is
> not in $path.
Index: Completion/Zsh/Type/_command_names
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Type/_command_names,v
retrieving revision 1.3
diff -u -r1.3 _command_names
--- Completion/Zsh/Type/_command_names 2001/06/21 09:33:16 1.3
+++ Completion/Zsh/Type/_command_names 2002/01/27 20:42:15
@@ -8,8 +8,17 @@
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author