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

Re: bufferwords() lexes a subshell in a shortloop repeat as a string



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.



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