From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25572 invoked by alias); 8 Sep 2016 21:48:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39247 Received: (qmail 7968 invoked from network); 8 Sep 2016 21:48:24 -0000 X-Qmail-Scanner-Diagnostics: from mx.spodhuis.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(94.142.241.89):SA:0(-1.1/5.0):. Processed in 0.576161 secs); 08 Sep 2016 21:48:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=RP_MATCHES_RCVD,SPF_PASS, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: zsh-workers+phil.pennock@spodhuis.org X-Qmail-Scanner-Mime-Attachments: |signature.asc| X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spodhuis.org designates 94.142.241.89 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201608; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date; bh=tw3a0ZKAeuJbrhtMzYIG4mUZLHZkNdCBFNXqqzKAlCk=; b=vxporv+rwYGaKljKf6XRHw5eUn HN5gXzSh7pmx6CpnmQKPHnxImQc+AzWW90P9WhUZ/d0G+x6ZnIQ7YSSQaFqC+pRTW/cPaeodaoZcB 94b68cCpP9cWQORCLLDJtdFts+6PdwUWifPLDZSk5ETW5EnabpmdxduLZ3nQy5E4j659Drx+BAd0/ I/Cv+tbnyoGnWcS+Mxtw9roET19Y; Date: Thu, 8 Sep 2016 17:48:09 -0400 From: Phil Pennock To: Oliver Kiddle Cc: zsh-workers@zsh.org Subject: Re: [PATCH] Add zsh/re2 module with conditions Message-ID: <20160908214809.GA12371@breadbox.private.spodhuis.org> References: <20160908041556.GA8401@breadbox.private.spodhuis.org> <9404.1473369244@hydra.kiddle.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <9404.1473369244@hydra.kiddle.eu> OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2016-09-08 at 23:14 +0200, Oliver Kiddle wrote: > Phil Pennock wrote: > > At this point, I haven't done anything about rebinding =3D~ to handle > > this. It's purely new infix-operators based on words. I'm thinking > > perhaps something along the lines of $zsh_reop_modules=3D(regex), with > > `setopt rematch_pcre` becoming a compatibility interface that acts as > > though `pcre` were prepended to that list and > > > > zsh_reop_modules=3D(pcre regex) > > > > having the same effect. Then I could use `zsh_reop_modules=3D(re2 rege= x)`. > > Does this seem sane? Anyone have better suggestions? I do want to have >=20 > If the first listed module in the array has control of =3D~, what is > the meaning of subsequent ones? Ignored, as long as the first one could be loaded. The first loadable one gets =3D~ It's bound and tied at that point. If the variable is re-assigned to, the shell would try again to work through the list. > How about perhaps using a module alias so you would do, e.g. > zmodload -A zsh/default/regex=3Dzsh/re2 Would probably need to be more than that, to be able to alias explicit features. It's C: infix-conditionals which need to be grabbed, a different one from each module. -Phil --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJX0dyPAAoJEBPa2Zx+QVGcvEkP/iOfqWNqCEo/xdlVVKLNzKxx m7Fe3w6niGNdnFZax73b3znKUFIsZC18Zgq0OzojLWkeBT50Kklpx1leMOtln8p4 d/Z1Y2ynksuuJbfifvFisa38lzdwXIuLHNfesRlsY/A5D/mOob8f6Yh4vENZmIvQ tGYCc+yyDMhqBlgJlqyNvHElMM9huPYgEVSTT/eOImxyGtYL1KiXIvXOEVQlNEIO RNMzmDPNQ42kCvMevNGvSVo0XtuRlRWJ/x0Wa1TBZ+fLQLwpfmnH3xTpVDZ9S86C iUaMQnqqD/mo8HqyOdvcEXRPJrGHbLNwxrLHd8r10eacJSl68K44B2l7L1XSTHHK AKmnZe+5dIXS6JqAHI3Nq51/o4E8MNMQz2bGwNSw+cW6I19fAVH3Y8yJsTd/CRdV b6FmXDZVZyJDsyhYj8tJwkwX7P8Qpf4HBxoc1GlEi0FkOsHEsk3Q9dZ8VMtIjBU4 KRTXHS6Ozzk+ygEVGChOR8odsaSA0PfWCJVFxw/6WCQj5UKkFcqbXfDpga9apver ifEldpleT59vciiX7NRJNyXHJUt56U1/WZ7H0yssdaMpPCrewJFrCg5cfnPPkQwc HCc/zE2AJFW7Y3P1tnAogS2UG4cdfX3CNPqcfIvnlgHQGxYZuyqk1wrwGnpqruTN 7NrtSocG8QCjc50KY+bH =9+Ax -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--