From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21257 invoked from network); 27 Jan 2002 20:43:30 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 27 Jan 2002 20:43:30 -0000 Received: (qmail 3138 invoked by alias); 27 Jan 2002 20:43:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16500 Received: (qmail 3125 invoked from network); 27 Jan 2002 20:43:20 -0000 Date: Sun, 27 Jan 2002 15:43:11 -0500 From: Clint Adams To: Sven Wischnowsky Cc: zsh-workers@sunsite.dk Subject: Re: _command_names and path Message-ID: <20020127204311.GA32345@dman.com> References: <20020121172829.GB6491@dman.com> <15437.17263.353779.491314@wischnow.berkom.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15437.17263.353779.491314@wischnow.berkom.de> User-Agent: Mutt/1.3.25i > 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