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 23398 invoked from network); 26 Aug 2023 20:39:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Aug 2023 20:39:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1693082358; b=BN0FhMH/hHJTqceNSOWGdsTyjvBfKu2f0moQ5Vb6kxzV/RxtMZJOJgdkAjlBRzZ4BcSoamUj7+ V7sumiXE429uHVErrKxbcwHhJHNGPiKfa9L6D9nxisSlVOV7Vl8AuhjeGQLWvtIv4JOib2Ts9P ile+eT5KdcdWw5dY/4sV4saEqo0TWA5ZlAJpEXsP26VE27L3u6med4we5Rvvx9mWUKWYTpcwR6 5QFZZf3vxp3VmoBuXHT0iL93Q+lHqusMsoh8bm59xZ18oY2VcECtxTGt30MCyobenBVVTFZFQ1 Oqwt7YTPqy/axVuOEkr6pKUijKSUeRwVNCQuK/4PfJqLWw==; 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=1693082358; bh=BsKLNphtIWquRhaTU7M+qbpwqYmVoi5IKqbIxLXWVko=; 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=E7L6Cgm7PnH0ix+euS9jX50lnNAPaAP/JM62oxuI6vTe22VNzwHjeIs6fDA+xorjONJgbIX5le ivvvoUjNFwqFThT6DpO/BpPMM2blEVGysA8heqIFDqBLypoIEnctWCzcc67XVfse3Ld6UgUuzi 6HbPZ5Ue9AAHYt32H5kcLwdb4MKkDSP3QsOY5eIjvUF/CWt94QtvhjdNIEZXwjMwLxWK1CJ9s/ 7AB4ncL7kIYQoL40DLWsqL80rm9Q1TzShOpnRl+A44DsZEHCFJ35SfJpntFdOmhnzzZNwQo+mW OtzdHG8C/ASS68Jz8G2juxdv/LKJSNIH9BDHFHoVi1yJag==; 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=vmdXLOMnSi3yVpjQGyw3ZidS7ieLqdZhdAFY3IATtgI=; b=X7uiuEzR5S9H/neV78UjjuMLsL QDOnOWXSddBd8a3jEROkVlEWAK6QGYtlk3Z6VXVg+OEOBjXF3l6TOnLl44kAX+BtW84bhJ2z64yL5 01hhklIw1x9HcSrDnG7E2uuTcqZB5TBPCf2wfMN31l47SgbQY2RhtkjOZ8+iogSkVlN5gFOSZOXDh HdzxZwxJMo089Xuhb3nrHCJJ0y8dGwv7yZVPGnj4TGNyzZIbhWmYjwd0lUttay18qVhXOSYlsRcxN 3RXyoVJnTeuB256ibDbsb7x7c8uUvc8dDnEa4pvgbmL7EUaVz+Csp2fU/gMusuN/rHUKtbTpX4hJT B8VeycYg==; Received: by zero.zsh.org with local id 1qa03y-000HXT-50; Sat, 26 Aug 2023 20:39:18 +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]:53921) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qa03Q-000Gor-Ri; Sat, 26 Aug 2023 20:38:45 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta02.eastlink.ca ([24.224.136.13]) with ESMTPS id <0S0022XQJMM2SXO0@mta02.eastlink.ca> for zsh-users@zsh.org; Sat, 26 Aug 2023 17:38:43 -0300 (ADT) Received: from [192.168.0.4] (host-24-207-18-108.public.eastlink.ca [24.207.18.108]) by csp01.eastlink.ca ([71.7.199.166]) with ESMTPSA id a03Oqg2PGsYhFa03Pq2Jwl (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sat, 26 Aug 2023 17:38:43 -0300 X-Authority-Analysis: v=2.4 cv=cLIm8HSN c=1 sm=1 tr=0 ts=64ea62d3 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=eSZI3zfu0Fxbhte6534A:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeftddgudehudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeeitdejffevgfdtheeggfetkeeugeegieetuddtvddvudetteffvdevlefgueekudenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrdegngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <522ad88e-adb2-74a7-103b-62af0f3e7b4e@eastlink.ca> Date: Sat, 26 Aug 2023 13:38:41 -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 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: 29206 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:26, Bart Schaefer wrote: > On Sat, Aug 26, 2023 at 12:34 AM Roman Perepelitsa > wrote: >> Zsh doesn't have the equivalent. You'll have to use a global parameter. Why not have a global variable and then just make the assignment to a local variable at each call of the function and update the global when and where desired or let the local variable just die otherwise?  I suspect I don't really understand the problem.