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=-5.2 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 24381 invoked from network); 26 Aug 2023 21:11:29 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Aug 2023 21:11:29 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1693084289; b=bIeupDQG+qmLnPwAzVXgNPYh/gT+zT8rwfWfBB1UzRYTSeLiva/bOdyIo1Sa7Q7UWWxQaLGilM cLCmEa4XZLmZ1Wczu82I2tIG51OoYeUh6mHCLr77kPhwamai28PMfO6qDKnFZ8teLM4oi9IUKA xOvdkIHlFcIqUT1V3nOi9vi2vKn31Ub4OvLT2X+XPfWiiAncqcgTKXvYK1YwQy20Sppt7F2tdV DCNLVs7VozK4hV20hnmthdOKyWLSLpes8Ry8ftbuJNDR6fc7xLkVaRJxIcyDEj6/SRVJvdVlf4 S9UzZDwyuBxR9jiL71p3mBonIg/UV4REYbwN5E28gzsYWg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; 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=1693084289; bh=bjOKuCe1LglQgWRHqHoLYHU2iqalvBtwljAw2HW2NYc=; 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=PzhXBOXHlGWAUjjhd1z4o/IyZralhZnV4vf2vHSCwhiRePWC+BI2dAvUqCQ6A2LUFsDkp9vgxH dKlG3pbfH9UHtoRe7Wjcd0L8E8JbxOOSmO4wtlfe5mkBilWc0rBiHtFbSf3/S88j0EcrULBxHy NdysCi/IZr+iUj8CbKDdD6K7ymFMd2E5rVNOPXdtAbMVC6KFcWeHA1jh0qZa85EfoFlt3pswT2 VjO7PkMZ6Tz8/lpYwxVVuu3ZA4tScP9Ce5/JRXhujvw4K8h35CpqyWvHnMImvAdIOUL/7IafBF mNnkCYAFnPDOCb/ULDbEnuRv0UTgauukdwWacUjRIsdqyg==; 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=R3WNeXK9/2cFoUG81RIIbk/fPKidNFAlC14PXfKcu6Y=; b=T7LswNQOisfgonBvGGL7vT0F5T 9RVIRk9LM0NXOoOGJH06qIvO0PbG40x+3J554yAovxNX79lr9BhT/NB46xzkUHcnUkk9JBw+MKUcG cRloHeyVLDIqkV73xWyFi+lk/5svmgIKbnl0G1oLykdBalxTD3ZSLbORxM20U1G8d3dMp+NhMFunB UGcX47mz7qE7gBGvIT8NnAPRGvSgTnmUBdQPIZ/SfqQsM4NDixyZCG++EzTKZeTkh+mzQVmqAOiZK GORCaRJKY2UpGl2zaWjzn/0Zo3ybhEBim19SMJKIZHdUDzKyRj6D5NJg0TaauKK0g70h6XhsGsCoP Z7VEoY5A==; Received: by zero.zsh.org with local id 1qa0Z6-000KcW-I7; Sat, 26 Aug 2023 21:11:28 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:41241) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qa0Yd-000Jtv-Pb; Sat, 26 Aug 2023 21:11:00 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta02.eastlink.ca ([24.224.136.13]) with ESMTPS id <0S00251MNO5FXNA0@mta02.eastlink.ca> for zsh-users@zsh.org; Sat, 26 Aug 2023 18:10:58 -0300 (ADT) Received: from [192.168.0.4] (host-24-207-18-108.public.eastlink.ca [24.207.18.108]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id a0YcqdC2kfmgfa0YcqCIFY (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sat, 26 Aug 2023 18:10:58 -0300 X-Authority-Analysis: v=2.4 cv=FOXdhcks c=1 sm=1 tr=0 ts=64ea6a62 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=2aYrqlEsmJrelderxggA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeftddgudehjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeeitdejffevgfdtheeggfetkeeugeegieetuddtvddvudetteffvdevlefgueekudenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrdegngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Sat, 26 Aug 2023 14:10:58 -0700 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: How to have function local variable but must behave just a simple one Content-language: en-US To: zsh-users@zsh.org References: <522ad88e-adb2-74a7-103b-62af0f3e7b4e@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 29208 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 2023-08-26 13:58, Roman Perepelitsa wrote: > > Indeed, given that in zsh there are no function-scoped parameters that > outlive an invocation of the function, Budi will have to use a global > parameter and take necessary precautions to ensure the name of the > parameter does not clash with other globals. > > Roman. I'm puzzled as to what the problem really is from a practical point  of view.  Easy enough to create a 'safe' name, no?  I suppose for  tidiness sake one might not want variables specific to only one function to be global, but there's zillions of that sort of variable already so one lives with that rather easily. And this is universal across all shells, yes?  I have a set of local variables that I need to survive reboot, so I write 'em to a file which is reread on startup.  That would work for Budi, but again it seems like there's not really a big problem.  (Mind, I have a long history of seeing problems where there is no problem ;-)