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 d4393beb for ; Wed, 18 Dec 2019 03:57:32 +0000 (UTC) Received: (qmail 25812 invoked by alias); 18 Dec 2019 03:57:24 -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: 45075 Received: (qmail 25613 invoked by uid 1010); 18 Dec 2019 03:57:24 -0000 X-Qmail-Scanner-Diagnostics: from wout1-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(64.147.123.24):SA:0(-2.6/5.0):. Processed in 4.546274 secs); 18 Dec 2019 03:57:24 -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: gggruggvucftvghtrhhoucdtuddrgedufedrvddtkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpedfffgrnhhivghlucfuhhgrhhgrfhdfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfrrghrrghmpehmrghilhhfrhhomhepugdrsh esuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvnecuvehluhhsthgvrhfuihiivgeptd 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: Date: Wed, 18 Dec 2019 03:56:23 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: { exit } always { foo } Content-Type: text/plain The documentation of the try-always construct says: An tt(exit) command (or a tt(return) command executed at the outermost function level of a script) encountered in tt(try-list) does em(not) cause the execution of var(always-list). Instead, the shell exits immediately after any tt(EXIT) trap has been executed. However, A01grammar.ztst expects the always-list to be run: 723 ( 724 mywrap() { echo BEGIN; true; echo END } 725 mytest() { { exit 3 } always { mywrap }; print Exited before this } 726 mytest 727 print Exited before this, too 728 ) 729 3:Exit and always block with functions: simple 730 >BEGIN 731 >END Which is correct, the manual or the test?