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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,MIME_QP_LONG_LINE, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5640 invoked from network); 25 Aug 2023 09:04:39 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Aug 2023 09:04:39 -0000 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:To:References:Message-Id:Date:Cc: In-Reply-To:From:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=ecUwR1iia2stMWPolwVYHwaPo5tqa2toUxRBiN+RqO0=; b=Kjrg+DDr45faOLV2HOIb2aFrrp CFy8cCL1SnVp1rDkjMIdtxs7yvcmiRwLs+cvQSHkN5YdXz32LAShBTuJIK2auAb49wFEPa08v0utd lxkZh1vBkhNrWLhMTXZu7XvhSWnW4uDiE+kSQ9/eZb7kBpSM8L/SezsocMu0EsQ8YjuMxbezQUP5g 75SGwLbVHQo0ktIiEMO78AC59IFLtID7JuRrs9t+v4AbSimZxSbFngkkYle3+/NIfDy+YzwxKgFNE DHaTLL/0z0KF71HxCVJKFW/LVe29vWWHrbeu2TgbMJcY5zkhvGYp/jptFRflQOoiwkwBKtyLqqHmj bVwMgygA==; Received: by zero.zsh.org with local id 1qZSkA-0005i1-DI; Fri, 25 Aug 2023 09:04:38 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qZSjt-0005OV-8I; Fri, 25 Aug 2023 09:04:22 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 4F0B427C0054; Fri, 25 Aug 2023 05:04:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 25 Aug 2023 05:04:17 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvkedguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfgggfuhfgjveffkfhfvffosegrjehmrehhtdejnecuhfhrohhmpefnrgif rhgvnhgtvgcugggvlhojiihquhgviicuoehlrghrrhihvhesiihshhdrohhrgheqnecugg ftrfgrthhtvghrnhepueehtdeglefgfeefheethffgiefffeduheevleekfefgkeekieel leduudfhtdeinecuffhomhgrihhnpehsohhurhgtvghfohhrghgvrdhiohenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihvhdomhgv shhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduhedukeejjedtgedqudduledvje efkeehqdhlrghrrhihvheppeiishhhrdhorhhgsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Aug 2023 05:04:16 -0400 (EDT) Content-Type: multipart/alternative; boundary=Apple-Mail-230ED383-7D00-44C6-962F-F2273360539F Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Subject: Re: [BUG] Shell option PRINT_EXIT_VALUE lost on function exit, even when LOCAL_OPTIONS is not set From: =?utf-8?Q?Lawrence_Vel=C3=A1zquez?= In-Reply-To: Cc: Mikael Magnusson , Zsh hackers list Date: Fri, 25 Aug 2023 05:04:04 -0400 Message-Id: References: To: Marlon Richert X-Mailer: iPhone Mail (20G75) X-Seq: 52095 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --Apple-Mail-230ED383-7D00-44C6-962F-F2273360539F Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On Aug 25, 2023, at 2:56 AM, Marlon Richert wro= te: > =EF=BB=BFFair enough, but the rest of my bug report is still valid. The behavior you reported is documented under LOCAL_OPTIONS, although it mig= ht be helpful to mention it under PRINT_EXIT_VALUE as well. LOCAL_OPTIONS If this option is set at the point of return from a shell function, most opt= ions (including this one) which were in force upon entry to the function are= restored; options that are not restored are PRIVILEGED and RESTRICTED. Othe= rwise, only this option, and the LOCAL_LOOPS, XTRACE and PRINT_EXIT_VALUE op= tions are restored. https://zsh.sourceforge.io/Doc/Release/Options.html#index-LOCAL_005fOPTIONS --=20 vq Sent from my iPhone= --Apple-Mail-230ED383-7D00-44C6-962F-F2273360539F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Aug 25, 2023, at 2:56 AM, Marlon Richert <marlon.richert@= gmail.com> wrote:

=EF=BB=BFFair enough, but the rest of my bug report is s= till valid.

The behavior yo= u reported is documented under LOCAL_OPTIONS, although it might be helpful t= o mention it under PRINT_EXIT_VALUE as well.

LOCAL_OPTIONS <K>

I= f this option is set at the point of return from a shell function, most opti= ons (including this one) which were in force upon entry to the function are r= estored; options that are not restored are PRIVILEGED and=  RESTRICTED. Otherwise, only this option, and the LOC= AL_LOOPSXTRACE and PRINT_EXIT_VALUE&= nbsp;options are restored.

https://zsh.sourceforge= .io/Doc/Release/Options.html#index-LOCAL_005fOPTIONS

-- 
vq
Sent= from my iPhone
= --Apple-Mail-230ED383-7D00-44C6-962F-F2273360539F--