From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9455 invoked from network); 27 Nov 2005 13:35:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Nov 2005 13:35:03 -0000 Received: (qmail 93711 invoked from network); 27 Nov 2005 13:34:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Nov 2005 13:34:53 -0000 Received: (qmail 18634 invoked by alias); 27 Nov 2005 13:34:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22039 Received: (qmail 18624 invoked from network); 27 Nov 2005 13:34:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Nov 2005 13:34:50 -0000 Received: (qmail 93348 invoked from network); 27 Nov 2005 13:34:50 -0000 Received: from mta08-winn.ispmail.ntl.com (81.103.221.48) by a.mx.sunsite.dk with SMTP; 27 Nov 2005 13:34:49 -0000 Received: from aamta12-winn.ispmail.ntl.com ([81.103.221.35]) by mta08-winn.ispmail.ntl.com with ESMTP id <20051127133448.KIJG17804.mta08-winn.ispmail.ntl.com@aamta12-winn.ispmail.ntl.com> for ; Sun, 27 Nov 2005 13:34:48 +0000 Received: from pwslaptop.csr.com ([81.105.238.64]) by aamta12-winn.ispmail.ntl.com with ESMTP id <20051127133447.JHML18425.aamta12-winn.ispmail.ntl.com@pwslaptop.csr.com> for ; Sun, 27 Nov 2005 13:34:47 +0000 Received: from pwslaptop.csr.com (pwslaptop.csr.com [127.0.0.1]) by pwslaptop.csr.com (8.13.4/8.13.4) with ESMTP id jARDYa8f004484 for ; Sun, 27 Nov 2005 13:34:37 GMT Received: from pwslaptop.csr.com (pws@localhost) by pwslaptop.csr.com (8.13.4/8.13.4/Submit) with ESMTP id jARDYWrO004473 for ; Sun, 27 Nov 2005 13:34:35 GMT Message-Id: <200511271334.jARDYWrO004473@pwslaptop.csr.com> X-Authentication-Warning: pwslaptop.csr.com: pws owned process doing -bs From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: path and += troubles In-Reply-To: Your message of "Sat, 26 Nov 2005 21:13:00 GMT." <1051126211300.ZM1008@candle.brasslantern.com> Date: Sun, 27 Nov 2005 13:34:26 +0000 Bart Schaefer wrote: > Exactly ... the problem is this: > > schaefer<508> echo $1+=($2) > zsh: no match > schaefer<509> $1+=($2) > schaefer<510> > > Where's my "no match" error in the second case? (I'll abandon the other patch since that's not what you're worried about.) I'm having a hard time coming up with a combination of options and arguments that does this. % zsh -f % echo $1+=($2) zsh: no matches found: +=() % $1+=($2) zsh: no matches found: +=() % fn1() { echo $1+=($2); } % fn1 fn1: no matches found: +=() % fn2() { $1+=($2); } % fn2 fn2: no matches found: +=() % fn2 path /usr/bin fn2: missing end of name (the last is supposed to look like what Steven was trying to do.) But didn't you say the problem was with NULLGLOB? Surely you'd expect the presence of something looking like glob qualifiers (as long as they're valid, and a lot of strings are valid global qualifiers) to make the command turn out to be a boojum? % setopt nullglob % foo(.) % $1+=(.) % $1+=($2) % What am I missing? One oddity is that +=($2) *does* give a "not an indentifier" error, which is almost redundant with the current way of parsing assignments. I think that's because the lexical analyser finds that "=" is not at the start, so searches for an assignment. Then it finds an empty identifier and skips over the "+". This means that it successfully meets the condition for an ENVSTRING (we got to the "=" without finding an invalid character). Later, the actual assignment rejects this with contumely. This is a small inconsistency. -- Peter Stephenson Web page still at http://www.pwstephenson.fsnet.co.uk/