Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] In reference to patch 39815, about (z) flag and $( parse error
On 12 Oct 2017 at 17:26:35, Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx) wrote:
> It'd most likely need to be in bufferwords(), which somehow needs to
> know that the STRING token returned from the lexer is [or not] a
> comment and that therefore it should [or not] ignore the subsequent
> NEWLIN. However, that cascades all the way down into gettok() which
> is where the "#" character is recognized and everything from there up
> to but not including the newline is consumed.
Sounds complicated. Good that parsing problem can be detected by buf+=$'\ntest' and checking if last element returned by (z)/(Z+cn+) is "test".
> So it's not that 5.0.6 was correct, it's that we've swapped one
> problem [that affects more than just (Z:n:)] for another.
I was hoping that the goal of this patch wasn't exactly equal to what it did with (Z+cn+), i.e. that it accidentally changed the flag's behavior.
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author