From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3048 invoked from network); 20 Aug 2004 16:43:51 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Aug 2004 16:43:51 -0000 Received: (qmail 97760 invoked from network); 20 Aug 2004 16:43:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Aug 2004 16:43:25 -0000 Received: (qmail 13258 invoked by alias); 20 Aug 2004 16:42:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7897 Received: (qmail 13247 invoked from network); 20 Aug 2004 16:42:42 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 20 Aug 2004 16:42:42 -0000 Received: (qmail 94459 invoked from network); 20 Aug 2004 16:40:44 -0000 Received: from pat.uio.no (129.240.130.16) by a.mx.sunsite.dk with SMTP; 20 Aug 2004 16:40:42 -0000 Received: from mail-mx6.uio.no ([129.240.10.47]) by pat.uio.no with esmtp (Exim 4.34) id 1ByCRV-0004P4-TY for zsh-users@sunsite.dk; Fri, 20 Aug 2004 18:40:42 +0200 Received: from 143.80-203-48.nextgentel.com ([80.203.48.143] helo=s.hn.org) by smtp.uio.no with asmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1ByCRT-00050P-OZ for zsh-users@sunsite.dk; Fri, 20 Aug 2004 18:40:39 +0200 Received: (qmail 6438 invoked by uid 1000); 20 Aug 2004 16:40:34 -0000 Date: Fri, 20 Aug 2004 18:40:34 +0200 From: Haakon Riiser To: zsh-users@sunsite.dk Subject: Re: In the tla completion function: "${(@P)var_cmd-*:FILE:_files}" Message-ID: <20040820164034.GB6405@s> Mail-Followup-To: zsh-users@sunsite.dk References: <20040816213204.GA6795@s> <20040817005205.GB2869@iup.edu> <20040820085546.GA1174@s> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-MailScanner-Information: This message has been scanned for viruses/spam. Contact postmaster@uio.no if you have questions about this scanning X-UiO-MailScanner: No virus found X-UiO-Spam-info: not spam, SpamAssassin (score=0, required 12) X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-3.4 required=6.0 tests=BAYES_00,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: -3.4 [Bart Schaefer] >> Hmm, strange that my shell gives 'bad substitution' when >> var_cmd is not defined. > So does Jason's, I'm sure. Jason's point is that var_cmd should > NEVER BE "not defined" in the _tla function. It's defined at the > point where it's declared, to be the second word on the command > line. OK, now I get it; the '-' fallback doesn't test var_cmd, but the variable named by the expansion of $var_cmd: % unset foo % var_cmd=foo % echo "${(@P)var_cmd-*:FILE:_files}" *:FILE:_files -- Haakon