zsh-workers
 help / color / mirror / code / Atom feed
* bufferwords() lexes a subshell in a shortloop repeat as a string
@ 2016-01-15  6:26 Daniel Shahaf
  2016-01-15  9:41 ` Peter Stephenson
  0 siblings, 1 reply; 22+ messages in thread
From: Daniel Shahaf @ 2016-01-15  6:26 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-01-24  5:55 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-15  6:26 bufferwords() lexes a subshell in a shortloop repeat as a string Daniel Shahaf
2016-01-15  9:41 ` Peter Stephenson
2016-01-15 19:25   ` Bart Schaefer
2016-01-17 18:16     ` Peter Stephenson
2016-01-17 22:46       ` Bart Schaefer
2016-01-18  9:41         ` Peter Stephenson
2016-01-18 16:36           ` Bart Schaefer
2016-01-18 16:52             ` Peter Stephenson
2016-01-19  0:32               ` Bart Schaefer
2016-01-19  3:29                 ` Bart Schaefer
2016-01-19  4:07                   ` kshglob + noglob (was Re: bufferwords() lexes ....) Bart Schaefer
2016-01-19  9:36                 ` bufferwords() lexes a subshell in a shortloop repeat as a string Peter Stephenson
2016-01-19 18:59                   ` Bart Schaefer
2016-01-18  2:25   ` Daniel Shahaf
2016-01-18 10:45     ` Peter Stephenson
2016-01-20  7:47       ` Daniel Shahaf
2016-01-20 15:59         ` Bart Schaefer
2016-01-21  6:50           ` Bart Schaefer
2016-01-23 23:53           ` Daniel Shahaf
2016-01-24  5:56             ` Bart Schaefer
2016-01-19  4:56     ` Bart Schaefer
2016-01-20  7:47       ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).