From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20079 invoked by alias); 12 Sep 2016 01:13:35 -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: 39286 Received: (qmail 16955 invoked from network); 12 Sep 2016 01:13:35 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f178.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.192.178):SA:0(0.0/5.0):. Processed in 0.131739 secs); 12 Sep 2016 01:13:35 -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=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: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) 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=qZi7J2QG6V3okbICitIkAsbwFYudtORGpJiZzaPsO4I=; b=jMqkcGruj/tD2TekveKxKgFPG2TuiIw1zvMcIBzScMp4TCy5rWXBhh5XlASHgm0G1A Uq209k7dppL2XLPfL63G5QKsYM1BbKht+LRPc5wfXM7swZx9JpjxPt0NXa4WP0/0ZiMg KgdHOovfqY0mQly9pwPqOanP76cp9bJJoDngzn+Emjtm7hPMskiZ5LYj23pObV9jWr5Q 1z6wC5DJp7CQV4wRxrzES34KhuQivOxdnj/u2qb+G0byItNpg9TOkZ2F78bCbeiHpX8/ wP6uR3tJ2BZlXJgOk9HbIzxK/zwc22AO1v4bUgg3sEO6koBklbSMPXqlQu2JLabNaOXg fBgQ== 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=qZi7J2QG6V3okbICitIkAsbwFYudtORGpJiZzaPsO4I=; b=J60INzx0AkORozSVGeRdR61fNLUAsjjtpTiieC+kuei2JBnX5+GuY9feVk3JJhvNf6 RUOuj3a9opGlC2gBk9O3SVOVKyx0ttTLTJ6xiEfGz3X6bMfltNMbVDa00ckwCl3Mqvz2 nPE5rM+6BWS+2/nPxkGNHvzzE/aWMH7v4jsBz5vmIZlVACFqU4+zplERLINlwzc9n5LQ 3VATqwM5ZCY8jjuw3Kr2uppYVsXEN1WGDn1VYAew1kr5xcQSGh1U240nFtDM7onmeT19 mVTsGSk2f3USYn7kUbdtMN7GEVwLYsHQ5YZbyhCib7gVcltp09255C4boxEsnkdbPNi9 B68g== X-Gm-Message-State: AE9vXwOWgnumdwL7E0ciJmweTItRYTWK6f4sNuY2L41PHXrC1xg+lFr0M0kehlmNJEH49A== X-Received: by 10.98.69.73 with SMTP id s70mr28657715pfa.115.1473642801544; Sun, 11 Sep 2016 18:13:21 -0700 (PDT) From: Bart Schaefer Message-Id: <160911181328.ZM21397@torch.brasslantern.com> Date: Sun, 11 Sep 2016 18:13:28 -0700 In-Reply-To: <20160911190255.541e973d@ntlworld.com> Comments: In reply to Peter Stephenson "Re: zsh heredoc crash" (Sep 11, 7:02pm) References: <25855010.qczLe9GZ8n@kdudka-nb> <20160909173515.4cb8392e@pwslap01u.europe.root.pri> <160909180250.ZM19582@torch.brasslantern.com> <20160911190255.541e973d@ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: zsh heredoc crash MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 11, 7:02pm, Peter Stephenson wrote: } } A "line" that matches a "word" means what it says: OK. Bash almost works the same way: $ echo "$(cat < something > EOF)" bash: warning: here-document at line 5 delimited by end-of-file (wanted `EOF') bash: warning: here-document at line 5 delimited by end-of-file (wanted `EOF') bash: warning: here-document at line 1 delimited by end-of-file (wanted `EOF') something EOF) $ So it similarly treats "EOF)" as part of the here-document / not a match for the end delimiter, but it also closes the quoted string rather than leave the parser hanging expecting more lines of here-document. Given our current parsing paradigm I can't think of a way to have zsh look for "end of here-document or end of current quote whichever comes first" and the zsh behavior is consistent with the command substitution having not yet closed either, so I guess we're fine.