From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22738 invoked by alias); 11 Sep 2016 18:12:10 -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: 39281 Received: (qmail 15102 invoked from network); 11 Sep 2016 18:12:10 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-1.server.virginmedia.net 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(80.0.253.65):SA:0(-0.0/5.0):. Processed in 0.130646 secs); 11 Sep 2016 18:12:10 -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 autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _smtprelay.virginmedia.com designates 80.0.253.65 as permitted sender) X-Originating-IP: [86.21.161.213] X-Spam: 0 X-Authority: v=2.1 cv=beuWK77B c=1 sm=1 tr=0 a=oo3MgO7t/4XyXFuSzI3dDQ==:117 a=oo3MgO7t/4XyXFuSzI3dDQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=HoFvaBmh-Ybo0Bej6hYA:9 a=CjuIK1q_8ugA:10 a=z9dJwno5l634igLiVhy-:22 Date: Sun, 11 Sep 2016 19:02:55 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: zsh heredoc crash Message-ID: <20160911190255.541e973d@ntlworld.com> In-Reply-To: <160909180250.ZM19582@torch.brasslantern.com> References: <25855010.qczLe9GZ8n@kdudka-nb> <20160909173515.4cb8392e@pwslap01u.europe.root.pri> <160909180250.ZM19582@torch.brasslantern.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 9 Sep 2016 18:02:50 -0700 Bart Schaefer wrote: > I get: > > torch% cat >> /tmp/try < heredoc> export A="$(tr '\n' ' ' < heredoc> content > heredoc> BLDARC)" > heredoc> EOF > zsh: parse error This is a feature: <<[-] word The shell input is read up to a line that is the same as word, ^^^^ A "line" that matches a "word" means what it says: % cat <<"HERE)" heredoc> First line heredoc> Second line heredoc> HERE) First line Second line Everything seeems to be working as documented. ("HERE)" without the quotes would not be "a word" in the shell sense.) However, of course, if you think you can make things better without breaking anything, feel free (I'm certainly not looking for things to change here). pws