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 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author