Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

bufferwords() lexes a subshell in a shortloop repeat as a string



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