Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] (z)-flag interrupts if $() in input
- X-seq: zsh-workers 39779
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [BUG] (z)-flag interrupts if $() in input
- Date: Sun, 30 Oct 2016 10:55:40 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=aGd8/Hwrkf0MdWjgK1Bu/HLaqqiPTrAzuB63A5de/ZA=; b=0kz6bSEtUb3DZYcecFxPRcoki1nVdvOHTqMMh/tDZx+Wi0nbRpg9hvjjhYWXifxzJy qnuknW5IXRuu54zJc3LbOLXCzHVMC/Bw7QeZ7IVk/pz5rr6L8IjpPDahEIEpx2U5cX1Y 3kyu8EFChVOfH6/jJJOFZCap1aL+kNQDOcToUeG0ATBNLw2SYOO1Paf1+8ZBuKaVpXpm hVLE9ZufYAeCDX7AXlMWrDpUeY2Vj8TsWXphRaQL3NiE2FckyGsBem4Xe9dNeXj9nj0K WmG/Q8fAEX00/mtRh5qvZRqBSxSYQBPTNqEcr2Q8Fz0HwgfsdqFGYCwAGs2lE5pkXH9n 7MoQ==
- In-reply-to: <20161030152525.GA12137@fujitsu.shahaf.local2>
- 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
- References: <1477809189.1509250.771544241.795E8177@webmail.messagingengine.com> <20161030152525.GA12137@fujitsu.shahaf.local2>
On Oct 30, 3:25pm, Daniel Shahaf wrote:
}
} "eval $a" returns a parse error in zsh but succeeds in sh. Let's put
} (z) to one side for the moment;
This actually is a question about (z) rather than about parse errors,
because other parse errors don't have the same problem:
torch% echo ||| print
zsh: parse error near `|'
torch% a='echo ||| print'
torch% print -rl -- ${(z)a}
echo
||
|
print
So the question is not whether $() is a parse error, but why $() eats
the rest of the command line.
Which I think is going to come down to the way cmd_or_math() has to
read ahead to discover whether $( starts a math expresion or a
command substitution -- but I haven't dug in that far.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author