Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Strange behavior of [[




On 11.06.2015 18:59, Peter Stephenson wrote:
> The change from mb_metacharinit() to mb_charinit() is a bit unsightly
> but the name had got just plain confusing --- there's nothing meta about
> it.  I never metacharacter I couldn't parse.
> 
> (No multibyte characters were harmed in the preparation of this email;
> I've used $'\ua0'.)
> 
> pws
> 
> <path diff>
> ...
> </path diff>

This patch (f1923bdfa6300a0d32e3329eb2488447f76b8970) introduces another
issue for me:

Regex evaluation using a conditional capture group crashes zsh when the
pattern is not found:

$ [[ "foo" =~ (foo)? ]] # pattern found, all fine
$ [[ "foo" =~ (bar)? ]] # pattern not found, crash
zsh: segmentation fault (core dumped)  zsh -f



Messages sorted by: Reverse Date, Date, Thread, Author