Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Wed, 20 Jan 2016 07:59:17 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jan 20,  7:47am, Daniel Shahaf wrote:
}
} bufferwords() received the "(x)" as a STRING token, so I looked further
} down, into gettok().  The attached patch seems to do the trick [see the
} added tests].  However, to paraphrase Knuth, I only tested this code,
} not proved it correct.  I'd appreciate a review.

I haven't tried compiling with the patch, but of course the interesting
test case is something like

repeat $( : complicated thing ending with; print $number ) (echo foo)

I.e. syntax is not "repeat TOKEN command" it's "repeat WORD command"

Also what's the reason for the trailing underscore on "inrepeat_"?  That
isn't done anywhere else in the source.