From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24328 invoked from network); 27 Oct 2004 15:03:57 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Oct 2004 15:03:57 -0000 Received: (qmail 44909 invoked from network); 27 Oct 2004 15:03:51 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Oct 2004 15:03:51 -0000 Received: (qmail 18035 invoked by alias); 27 Oct 2004 15:03:41 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8135 Received: (qmail 18011 invoked from network); 27 Oct 2004 15:03:39 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Oct 2004 15:03:39 -0000 Received: (qmail 43932 invoked from network); 27 Oct 2004 15:03:39 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 27 Oct 2004 15:03:37 -0000 Received: from 212.red-80-35-44.pooles.rima-tde.net ([80.35.44.212]:42274 helo=dervishd.net) by ns9.hostinglmi.net with esmtpa (Exim 4.43) id 1CMpKr-00051T-JK for zsh-users@sunsite.dk; Wed, 27 Oct 2004 17:03:38 +0200 Date: Wed, 27 Oct 2004 17:06:25 +0200 From: DervishD To: Zsh Users Subject: Re: compadd and an array parameter Message-ID: <20041027150625.GC10003@DervishD> Mail-Followup-To: Zsh Users References: <20041026165902.GA6546@DervishD> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20041026165902.GA6546@DervishD> User-Agent: Mutt/1.4.2.1i Organization: DervishD X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns9.hostinglmi.net X-AntiAbuse: Original Domain - sunsite.dk X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dervishd.net X-Source: X-Source-Args: X-Source-Dir: X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi all :) My excuses again for self-replying... * DervishD dixit: [...] > [[ $compstate[context] = "command" ]] && compadd ${commands##*/} [...] > Well, what I want is to complete using the contents of the > 'commands' array, but with the path stripped, but I think that the > compadd command above will lead to a very big expansion. Can I tell > compadd something like 'compadd -a commands' and something more to > make it strip the path or the expansion above is the only way? Better 'compadd -k commands'. The keys of the 'commands' associative array are the command names, without path. I don't know what I was thinking... Sorry for the noise. What a day... Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.dervishd.net & http://www.pleyades.net/