From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12574 invoked from network); 4 Nov 2005 10:33:39 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Nov 2005 10:33:39 -0000 Received: (qmail 69613 invoked from network); 4 Nov 2005 10:33:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Nov 2005 10:33:32 -0000 Received: (qmail 1169 invoked by alias); 4 Nov 2005 10:33:25 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9617 Received: (qmail 1160 invoked from network); 4 Nov 2005 10:33:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Nov 2005 10:33:24 -0000 Received: (qmail 68534 invoked from network); 4 Nov 2005 10:33:24 -0000 Received: from cluster-c.mailcontrol.com (HELO rly06c.srv.mailcontrol.com) (168.143.177.190) by a.mx.sunsite.dk with SMTP; 4 Nov 2005 10:33:22 -0000 Received: from exchange03.csr.com (mailhost1.csr.com [81.105.217.43]) by rly06c.srv.mailcontrol.com (MailControl) with ESMTP id jA4AX05p011570 for ; Fri, 4 Nov 2005 10:33:20 GMT Received: from news01 ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 4 Nov 2005 10:35:29 +0000 Date: Fri, 4 Nov 2005 10:33:00 +0000 From: Peter Stephenson To: zsh-users@sunsite.dk Subject: Re: what zshcompsys-syntax is equals compctl -C -f ? Message-Id: <20051104103300.79aefefb.pws@csr.com> In-Reply-To: <436B2B11.1070503@atlas.de> References: <436B2B11.1070503@atlas.de> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Nov 2005 10:35:29.0117 (UTC) FILETIME=[79AD48D0:01C5E12B] X-Scanned-By: MailControl A-05-40-01 (www.mailcontrol.com) on 10.67.0.116 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Eike Kroemer wrote: > I used "compctl -C -f" to avoid path-lookup in completion. > For example assume my $PWD has a subdirectory "bin/" and I want to call > "Script" located in this dir. So you want local directories (not using CDPATH), and any executable files in them, right? Try adding: _local_exes() { _files -g "*(*)" } compdef _local_exes -command- after the point where "compinit" runs. This makes command context (which means basically what you think) run your function instead of the default. The function uses a glob qualifier to match all executable files. The _files function automatically lets you search for the file in subdirectories (in fact, I've discovered I'm a bit vague on how to stop it doing that, but luckily you don't need to). All sorts of variations are possible. You should be able to get away with putting a suitable function in your $fpath, but I couldn't get that to work (it get being overridden however I organised my fpath and deleted the dumped configuration), so just stick with the lines above or similar. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com