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

On Jan 17,  6:16pm, Peter Stephenson wrote:
} Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a str
}
} 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.)

Hrm.  I see no evidence of that.

Src/zsh -f

torch% emulate sh 
torch% print -l one (two three) four
one
(two three)
four
torch% 

ARGV0=sh Src/zsh

$ print -l one (two three) four
one
(two three)
four
$ 

It appears that parens are still parsed as grouping, even though they
thereafter are considered a literal pattern character.  E.g., I expected
"|" to be treated as a pipe in the following:

$ print -l one (two three|foo) four
one
(two three|foo)
four