From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16672 invoked from network); 26 Oct 2004 16:57:26 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Oct 2004 16:57:26 -0000 Received: (qmail 74253 invoked from network); 26 Oct 2004 16:57:20 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Oct 2004 16:57:20 -0000 Received: (qmail 17182 invoked by alias); 26 Oct 2004 16:56:35 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8126 Received: (qmail 17167 invoked from network); 26 Oct 2004 16:56:33 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Oct 2004 16:56:33 -0000 Received: (qmail 72762 invoked from network); 26 Oct 2004 16:56:14 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 26 Oct 2004 16:56:12 -0000 Received: from 212.red-80-35-44.pooles.rima-tde.net ([80.35.44.212]:41184 helo=dervishd.net) by ns9.hostinglmi.net with esmtpa (Exim 4.43) id 1CMUcG-0004Bt-1W for zsh-users@sunsite.dk; Tue, 26 Oct 2004 18:56:12 +0200 Date: Tue, 26 Oct 2004 18:59:02 +0200 From: DervishD To: Zsh Users Subject: compadd and an array parameter Message-ID: <20041026165902.GA6546@DervishD> Mail-Followup-To: Zsh Users Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 :) I'm playing (again) with the completion code, and I've written something like this: bindkey "^O" completer zle -C completer expand-or-complete completer function completer () { [[ $compstate[context] = "command" ]] && compadd ${commands##*/} return 0 } 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? Of course, I could examine 'CURRENT', perform a match and include only that match in the compadd command line, but I'm curious... Thanks a lot in advance :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.dervishd.net & http://www.pleyades.net/