Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string
From: Peter Stephenson <[email-masked]>
To: [email-masked]
Date: Sun, 17 Jan 2016 18:16:47 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Fri, 15 Jan 2016 11:25:16 -0800
Bart Schaefer <[email-masked]> wrote:
> On Jan 15,  9:41am, Peter Stephenson wrote:
> } Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a str
> }
> } it's just splitting words, and (... ...) indeed works as a complete word
> 
> Urk.  That probably ought to be disabled, at least in shell emulation,
> e.g. here is bash:

shwordsplit does this.  (I thought it would be shglob, but it isn't.)

By the way, I was too glib before: if you have a string that *starts*
with "(", it *does* get split as a complete command line that starts
with a subshell, even in native mode, as you might expect.  So I think
(z) is behaving basically rationally, but with the caveat I mentioned
that it's a fairly brutal tool in comparison with real context
sensitivity.

pws