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 11 października 2017 at 19:02:31, Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx) wrote:
> Hmm, so the problem appears to be that when parsing a comment, we
> actually need the NEWLIN token to mark the end of the comment.
> When parsing code, we need NEWLIN to be ignored as whitespace and
> not tokenized.
> That is, in your example the ZSH_AUTOSUGGEST_CLEAR_WIDGETS line is
> parsed incorrectly (with my patch) because the line preceding it is
> a comment.
> So I think the fix for this is going to have to be elsewhere, rather
> than in zshlex().

Have you any possible places for the fix? I've ran bisect, and the "<= 5.0.6 doesn't have Z+cn+ problem" holds up to this patch:

commit c0d01a6fe0c67911650730cf13a2b9a0db16e59b
Date:   Tue Jan 6 17:05:17 2015 +0000

    Fix command substitutions to parse contents as they are read in.

    Do this by refactoring misnamed lexsave()/lexrestore() to allow
    continuity of history and input.

So accurately it's 5.0.7-dev-1. Looks old, but 2015 isn't that far away.

Sebastian Gniazdowski
psprint /at/ zdharma.org

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