Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: zsh/regex and =~
- X-seq: zsh-workers 23480
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: zsh/regex and =~
- Date: Tue, 29 May 2007 01:56:16 -0700
- 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=;
- In-reply-to: <20070428075635.GA17419@xxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20070428075635.GA17419@xxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author