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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2801 invoked from network); 26 Nov 2022 04:28:42 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Nov 2022 04:28:42 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1669436922; b=OgcyRe4UiKUljwwUUMadzfgWwQJZuTzbKMSvB46kktVhuqUHU7VoKue3H5z8Hn8ywaIXQT4ido a0+PxJL1t0l8jTLxxRfcllUkiKC/cnflqNAFqMvR/3u8H6wl/ZHv5hzjT5z9IadQIvH9NDm1k9 QGxG9L/7nM3RLFfh7Mb2csZP65tYB8QfjP9wRrlm3nxNSp8pyeU2SsqGl+nbT7xcfTpkkP/u0/ fY4gwxGw83Wb7N0N4d5EiDwIWHUklN2zVl7DIEyRA24/jGGWdBlWR8FJh6ACEnPkJHtMSqd9Ks oY79xggrTG44UXcjDfTDof4bc92+svwqnt3z4aYxdrfegQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1669436922; bh=Btjljrcyw/mfADjx3/41OpYprmSV8U1X4EhC9vdXk1c=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=GRyqMzCp4Rkjn5Qdcl3nLzEmpgJFxxDl8tG4Qp7gAY3VWRGRsp8cRHZXykxl2Zjz8hXpaJsfnO RSd2xk7cZeV+hIwBgJjpRzsyBlmkjiEaG5IV1YKP7CRbuQcKr+dSH5W0SRJcTP5PThs92vsTPD Gsqdvj5ZtKvcEoMq9mVkDlTN5dv4eqKZ89CRRkW7jNXxqAJdFii2t2eDZqHebkMFiZ9Up0ypYN T0R2BioXjlVmK2NE5mqgx+xteLrZPgr0fNzDZH6OmMKC7Vi3ngc3mGVDNGF+WKsL/+ukwoPD5a ClGc5EeMeTle6T0UmsPYLLFMCHnGNAVXz8QTmQtz7MLCow==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:From:References:To:Subject:MIME-version:Date: Message-id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=vdjTjD6iAMUgIsG05P8ryIvP9ZWFJGpFrTDGqzbsYcI=; b=oAK4XsnkdRYWHtukPYAVrtQ1xF JwliB4dKHYMHKnOSQTyATK7sl+x8AYRI7g6y6kg5Ph9un1/dmfoy1CZqaNsy+a5BBSqxu4v86rLb4 b6qgeJHEZkb3uotUwcW9PKU6J8f/TTY15TcrOWgBVur8X2SILquTI3sD7ZyFt89a4lTeE/TYlyiBs DkpSX3xoR+GYKFhYHI7STjh64BmaKlG7M7mHJY0baStINk0P0uvQT6fS2qK7buNXcmwzRJwjv2S/8 UnekCk/ZdRYIoIYwDpULCe7c+KpVhBIlVfUD2HIEzqNHIWfSV3xjxCTbh0Lw9UeOYH7+GlmF+i4F8 x+o5ea+w==; Received: by zero.zsh.org with local id 1oymnx-0003eU-Ro; Sat, 26 Nov 2022 04:28:41 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:35653) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1oymmh-0002re-HA; Sat, 26 Nov 2022 04:27:23 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta03.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RLX00DPSSGJE570@mta03.eastlink.ca> for zsh-users@zsh.org; Sat, 26 Nov 2022 00:27:21 -0400 (AST) Received: from [192.168.0.4] ([24.207.18.108]) by Eastlink with ESMTPSA id ymmfoiv1XkffJymmfo1PAq; Sat, 26 Nov 2022 00:27:21 -0400 X-Authority-Analysis: v=2.4 cv=Lbf6qBTi c=1 sm=1 tr=0 ts=638195a9 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=0F7oE4AcuyLPMkIWVbsA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieeigdeilecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeeitdejffevgfdtheeggfetkeeugeegieetuddtvddvudetteffvdevlefgueekudenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrdegngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Fri, 25 Nov 2022 20:27:21 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: trap question To: zsh-users@zsh.org References: Content-language: en-US From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28432 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 2022-11-25 17:57, Bart Schaefer wrote: > remain un-expandable within single quotes. Is this an exception or >> somehow to be viewed as routine? > You can think of "trap" as a delayed "eval". Ok, so I can continue to expect that there's no expansions within single quotes.  It's sorta intuitive that a trap is a special case. > >> BTW, will this trap catch exiting >> errors or just proper returns? > Depends on the error. If you have "setopt err_exit" (or err_return) > then the trap will be tripped when something returns false, I have that off by default, sounds like it should be on.  Thing is that this is for a function that uses zcurses and if it quits before cleaning up after itself ...  it's quite remarkable how many different things might go wrong when zcurses still wants to be in charge.  So I'm hoping the trap -- which does all the cleanup -- will be sprung after any internal error as well as controlled exits.  Mind that's luxurious if it can do it, I know how to mop up elsewise. BTW, speaking of zcurses, I see nothing in the doc, but is there a way to list open windows?