From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3844 invoked from network); 7 Jun 2020 17:25:39 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 7 Jun 2020 17:25:39 -0000 Received: (qmail 10506 invoked by alias); 7 Jun 2020 17:25:31 -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: List-Unsubscribe: X-Seq: 46022 Received: (qmail 3036 invoked by uid 1010); 7 Jun 2020 17:25:30 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-11.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25835. spamassassin: 3.4.4. Clear:RC:0(80.0.253.75):SA:0(-2.0/5.0):. Processed in 0.741459 secs); 07 Jun 2020 17:25:30 -0000 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.75 as permitted sender) X-Originating-IP: [86.16.88.158] X-Authenticated-User: p.w.stephenson@ntlworld.com X-Spam: 0 X-Authority: v=2.3 cv=Mq3mFFSe c=1 sm=1 tr=0 a=MiHCjVqLJ44lE3bxSlffFQ==:117 a=MiHCjVqLJ44lE3bxSlffFQ==:17 a=IkcTkHD0fZMA:10 a=iKrn8l-KAAAA:8 a=iHOsI5WepAMUGBNQ_6EA:9 a=QEXdDO2ut3YA:10 a=vz8bQswTWcriz0i0jksL:22 Message-ID: Subject: Re: [PATCH v2] exec: run final pipeline command in a subshell in sh mode From: Peter Stephenson To: zsh-workers@zsh.org Date: Sun, 07 Jun 2020 18:24:56 +0100 In-Reply-To: References: <20200605015338.1347787-1-sandals@crustytoothpaste.net> <20200605015338.1347787-2-sandals@crustytoothpaste.net> <20200605204144.GD6569@camp.crustytoothpaste.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfKimGAgXK6wpm6nY0WEZHFnjThgXMjpjVi/0c5f4dOx1aXYJLtwKqpTxGLbcOpN9Kmii8W7d6kB61MMzjIFHEZbkp8bzMovHPsD+qSX7bzlsUodpg/VA gSS8cfr0gyezWGbE6pfl0JQTDc5zi3EkS1gR236Ytt7DpcbbImqSCOVL On Sun, 2020-06-07 at 09:55 -0700, Bart Schaefer wrote: > On Fri, Jun 5, 2020 at 1:42 PM brian m. carlson > wrote: > > > > I will tell you that as a practical matter, nobody writing code for sh > > expects the last command not to be run in a subshell and consequently > > lots of code is practically broken in this case with zsh as /bin/sh. > > I believe you, but would be curious to see an example. > > For what it's worth, I'm not opposed to this patch. I think it's > pretty unlikely that anyone is invoking zsh as sh and still expecting > to be able to (for example) pipe into read to set variables in the > current shell. Yes, since I'm still here, that's my position too. Our general position on consistency is that we'll try our best to keep native mode compatible, while with sh compatibility we'll try to be like other shells and not worry so much about what zsh used to do. But it's a little bit of an odd case here for all the reasons I won't rehash. pws