Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Add zsh/re2 module with conditions
- X-seq: zsh-workers 39246
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Add zsh/re2 module with conditions
- Date: Thu, 08 Sep 2016 23:14:04 +0200
- Cc: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1473369245; bh=oQ0wwsjO11+uWPUQw9RoslDhLubZByWSf8Oa6ASkyqA=; h=In-reply-to:From:References:To:cc:Subject:Date:From:Subject; b=DIElrr8sjOraIdBYlXew0WVz2zE8sGdJkZk5IwS8fw67X9bUux/jaNjkHRrP5DPDQ0W9/JtIP7+cvaiKoZg5kKLgT5y/0OKOTdi4J+XlGCT3JuhAa+kcQZOMxLuJL3DQguX65rmRj6FXJEdQfafULbiHAKCzJDYwNefaH80T6oP9iXZKpYHYH9CutIVMHl+dLBKw9xDnXyZmGdlFdn/Uk64G9OPctKcxyuCq/Bjs1d4Qtp0yfPaJzCQxeptw7n87oWOQu+LFcd05FZP/TB3oA1MtKDetzdcDsmcO3c+Sttw79WIJ9MTX8v7I73E36iHKpNPiE7NR2u5WrroB/u8lHw==
- In-reply-to: <20160908041556.GA8401@breadbox.private.spodhuis.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160908041556.GA8401@breadbox.private.spodhuis.org>
Phil Pennock wrote:
> At this point, I haven't done anything about rebinding =~ to handle
> this. It's purely new infix-operators based on words. I'm thinking
> perhaps something along the lines of $zsh_reop_modules=(regex), with
> `setopt rematch_pcre` becoming a compatibility interface that acts as
> though `pcre` were prepended to that list and
>
> zsh_reop_modules=(pcre regex)
>
> having the same effect. Then I could use `zsh_reop_modules=(re2 regex)`.
> Does this seem sane? Anyone have better suggestions? I do want to have
If the first listed module in the array has control of =~, what is
the meaning of subsequent ones?
How about perhaps using a module alias so you would do, e.g.
zmodload -A zsh/default/regex=zsh/re2
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author