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 Fri, 15 Jan 2016 11:25:16 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author