From: Clint Adams <clint@zsh.org>
To: Sven Wischnowsky <wischnow@berkom.de>
Cc: zsh-workers@sunsite.dk
Subject: Re: _command_names and path
Date: Sun, 27 Jan 2002 15:43:11 -0500 [thread overview]
Message-ID: <20020127204311.GA32345@dman.com> (raw)
In-Reply-To: <15437.17263.353779.491314@wischnow.berkom.de>
> 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
next prev parent reply other threads:[~2002-01-27 20:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-21 17:28 Clint Adams
2002-01-22 10:48 ` Sven Wischnowsky
2002-01-27 20:43 ` Clint Adams [this message]
2002-01-28 16:31 ` Sven Wischnowsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020127204311.GA32345@dman.com \
--to=clint@zsh.org \
--cc=wischnow@berkom.de \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).