From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27811 invoked from network); 29 May 2007 08:56:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 May 2007 08:56:32 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 99837 invoked from network); 29 May 2007 08:56:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 May 2007 08:56:26 -0000 Received: (qmail 17119 invoked by alias); 29 May 2007 08:56:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23480 Received: (qmail 17108 invoked from network); 29 May 2007 08:56:22 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 May 2007 08:56:22 -0000 Received: (qmail 99554 invoked from network); 29 May 2007 08:56:22 -0000 Received: from redoubt.spodhuis.org (HELO mx.spodhuis.org) (193.202.115.177) by a.mx.sunsite.dk with SMTP; 29 May 2007 08:56:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=first1; d=spodhuis.org; h=Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=KmU1vWFVcK3qyzpMM8m+0iNv6G7+jY89i401+Rf1mcOuXbYZale+XHajc/pPa+Jvmc2En43FlHYOp2ybzlM+naAalL2EugTCGcX3ondGmAbL/y1woWUp9CPOYLHc8BXRAT7fdSXPZA24cDglUBtF8HZaRf4zR9uicoHKBYSFR/E=; Received: by smtp.spodhuis.org with local id 1HsxV2-0007Gq-38; Tue, 29 May 2007 08:56:16 +0000 Date: Tue, 29 May 2007 01:56:16 -0700 From: Phil Pennock To: zsh-workers@sunsite.dk Subject: Re: PATCH: zsh/regex and =~ Message-ID: <20070529085615.GA27886@redoubt.spodhuis.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <20070428075635.GA17419@redoubt.spodhuis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070428075635.GA17419@redoubt.spodhuis.org> On 2007-04-28 at 00:56 -0700, Phil Pennock wrote: > Index: Src/parse.c > =================================================================== > RCS file: /cvsroot/zsh/zsh/Src/parse.c,v > retrieving revision 1.64 > diff -p -u -r1.64 parse.c > --- Src/parse.c 23 Apr 2007 17:24:23 -0000 1.64 > +++ Src/parse.c 28 Apr 2007 07:42:52 -0000 > @@ -2124,6 +2124,12 @@ par_cond_triple(char *a, char *b, char * > ecstr(a); > ecstr(c); > ecadd(ecnpats++); > + } else if ((b[0] == Equals || b[0] == '=') && > + (b[1] == '~' || b[1] == Tilde) && ~b[2]) { > + ecadd(WCB_COND(COND_REGEX, 0)); > + ecstr(a); > + ecstr(c); > + ecadd(ecnpats++); > } else if (b[0] == '-') { > if ((t0 = get_cond_num(b + 1)) > -1) { > ecadd(WCB_COND(t0 + COND_NT, 0)); *blush* Uhm, the third character of the sequence comprising the =~ operator needs to be a NUL, which should be tested with a logical negation, not a bitwise negation. I'd wonder what I was thinking but apparently I wasn't thinking. Could someone with commit access please fix that to be !b[2] ? Thanks, -Phil :^( who only noticed whilst debugging an updated viewvc install