Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Mon, 18 Jan 2016 19:29:08 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jan 18,  4:32pm, Bart Schaefer wrote:
}
} Aside:  "emulate sh" does the equivalent of
} 
}     setopt shglob noglob nokshglob

My bad.  That's "ARGV0=sh zsh -f", not emulate.  I should not have
used -f there; mistaken history edit.

However, @(foo) is *parsed* as a pattern with only kshglob, but then
does NOT *match* as a pattern unless glob is also set.  

To get back on the original topic of this thread, here's more oddness
from bufferwords():

torch% print -l ${(z):-repeat 3 (echo foo;echo bar)}  
repeat
3
echo
foo
;
echo
bar
torch% 

Where did the parens go?  I suspect something is failing to set tokstr.
Without the (z) flag, the parens are interpreted as delimiting glob
qualifiers.