From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 43737360 for ; Thu, 19 Dec 2019 16:06:05 +0000 (UTC) Received: (qmail 23049 invoked by alias); 19 Dec 2019 16:06:00 -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: 45092 Received: (qmail 19780 invoked by uid 1010); 19 Dec 2019 16:06:00 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(66.111.4.25):SA:0(-2.6/5.0):. Processed in 1.525271 secs); 19 Dec 2019 16:06:00 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdduuddgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepfdffrghnihgvlhcuufhhrghhrghffdcuoegurdhssegu rghnihgvlhdrshhhrghhrghfrdhnrghmvgeqnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgenucevlhhushhtvghrufhiiigv pedt X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-694-gd5bab98-fmstable-20191218v1 Mime-Version: 1.0 Message-Id: <5c399b50-83b5-4541-b5be-56106ffb4e87@www.fastmail.com> In-Reply-To: <1576769851.4486.16.camel@samsung.com> References: <20191218052322.k744i7dwonwgeh33@tarpaulin.shahaf.local2> <3d6e4d83-5ec1-4d04-8d3f-374811d4eb49@www.fastmail.com> <1576769851.4486.16.camel@samsung.com> Date: Thu, 19 Dec 2019 16:05:03 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: Re: { exit } always { foo } Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Peter Stephenson wrote on Thu, 19 Dec 2019 15:37 +00:00: > On Thu, 2019-12-19 at 15:28 +0000, Daniel Shahaf wrote: > > Daniel Shahaf wrote on Wed, 18 Dec 2019 05:23 +00:00: > > >=20 > > > So, personally, I would find it more intuitive to change the imple= mentation to > > > match the documentation, than the other way around. > > I'll wait a bit more for feedback. If the decision ends up being to= change the > > implementation to match the documentation, I'll at least document it= as > > a bug/incompatibility, or maybe fix it if I manage that. >=20 > I don't think it's that big a deal either way as long as the inconsist= ency > gets fixed; I'd be happy to leave it to what ever feels most natural i= f you're > using the feature in question. I think there are actually two separate questions here: - Whether 'return outside of any function' should be equivalent to 'exit= ' - Whether the always-list should be run if the try-list does an exit I'm not sure what my answers to these questions any more. For that matter, should the always-list run if a SIGINT is received duri= ng the try-list? What about SIGQUIT? The documentation only says the always-l= ist will be executed in case of "a condition such as a syntax error which ca= uses the shell to abort execution [...]". Hmm=E2=80=A6 Daniel