From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11601 invoked by alias); 30 Oct 2016 17:55:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39779 Received: (qmail 20155 invoked from network); 30 Oct 2016 17:55:28 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f46.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.213.46):SA:0(0.0/5.0):. Processed in 0.78871 secs); 30 Oct 2016 17:55:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.213.46 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=aGd8/Hwrkf0MdWjgK1Bu/HLaqqiPTrAzuB63A5de/ZA=; b=e5oFY7EJDBHKBUlBpuT+Zkdy7qsne3OFfwiXNWn9IxYw7XmoKf0HJGSxS/U3BdKUzs E52bXATVu8dJJf2XD4l1hhQSrdZqdBGuA9uoTAQw9UVgWupM/AXXGaIjOGnJnAf1nev7 7oFMS/sZg6JC+ClKaekLvjAXnkZgIdLmuQyqDkOHJZiMvGuC3rMUm3Kcd+esvTK4boV5 +yL4cKbX+/Efqc3KuyzttahzjRoArjflFbJQ6NFNkrmG3dmSMHp8UbMFlCJr5wNdgWWJ Nj2SxsGokPKahh5w6ex9SggH3lnL3vsPz7vQToWsSXlCfZvgVYfYL+30r4i3OWTOCKm7 oI1g== X-Gm-Message-State: ABUngvd1Yo31Vl0xyWp9KxZI7fZl0WH3EOm8av0ywqqob2NKBnO3AKWwmqhFZK/WhV1Y1A== X-Received: by 10.31.96.71 with SMTP id u68mr3651477vkb.72.1477850120595; Sun, 30 Oct 2016 10:55:20 -0700 (PDT) From: Bart Schaefer Message-Id: <161030105540.ZM14392@torch.brasslantern.com> Date: Sun, 30 Oct 2016 10:55:40 -0700 In-Reply-To: <20161030152525.GA12137@fujitsu.shahaf.local2> Comments: In reply to Daniel Shahaf "Re: [BUG] (z)-flag interrupts if $() in input" (Oct 30, 3:25pm) References: <1477809189.1509250.771544241.795E8177@webmail.messagingengine.com> <20161030152525.GA12137@fujitsu.shahaf.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [BUG] (z)-flag interrupts if $() in input MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.