Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
bufferwords() lexes a subshell in a shortloop repeat as a string
- X-seq: zsh-workers 37635
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: bufferwords() lexes a subshell in a shortloop repeat as a string
- Date: Fri, 15 Jan 2016 06:26:48 +0000
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
The ${(z)} modifier gives me a subshell as a single unit:
% pz() { print -rl - ${(qq)${(z)1}} }
% pz 'repeat 3 (echo this is a subshell)'
'repeat'
'3'
'(echo this is a subshell)'
I expected the subshell to be broken into '(', 'echo', …, ')' tokens, as
per usual.
Looking at it in gdb, I see (after the third call to ctxtlex()):
tok == STRING
tokstr == "(echo this is a subshell)"
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author