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,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19356 invoked from network); 10 Jan 2024 03:00:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Jan 2024 03:00:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1704855644; b=LPu1+Jqc9ox4LJTkadMM9ShKVtR18GvmFe58qSRCv4ViWR2nSbpX8HI5tq1gKlPVyBgdThGdTr hq2Yr4XPa75C4p15nJBa4pCoeAm5cgtGBi+e6QmtiF67ZGhNQkW+Hqgd0Q73gXoDIbWvoOThBa PyL2EONg6mnHqk1ZWJPKyDG4if1bPsG8QxASiuNvSY2XqecGpZ5H7iZivkIZZ94gSHa9TblBFu 6Y/KQ5LN6CH6CjUHeXHPTA8jP+MtvmLrZQhGXJJHWLgKf7OD8cVSLBh8Q6NxgWvQHTVCr7w2j5 Qa1hg6lq4jLVBs9rx0niuT1G6Ukozhezx3DEBPMH8BtG4A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; 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=1704855644; bh=lzYBbBvDBhCFef0mzIyR9kcQcifbq834knfhqTq7bwU=; 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:Cc:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=o0V2lsJmZJA/JUWwI0SEAVmu7rTWgcVLsVbEDTan9H+TU09cWtRi45S40x+YzHdeI6QTnLGzGj CUiSkeUURdwm6HRV353BH9LmqgG3K9jWKhRLL7WmO2iWd80lnmdXMvnqcWGMWPLIWcWyn19aJ8 7j5Ea7ujguHYox4tbM9TzYf9FAcElfjsLyd6vcP8Igz+3nEByJbMac/gDhmmZJmRvQ769riyW3 8VVNIANJz3a715SHzRxFNo4PEpoqflVR0wnJ5eNLUuCOQYRQDXlMGDURBa7uxUKdhH78AwDmIp eO/xtcKz+3d/lOO1tN+mlrUDbRFAocR93tivLhxBPoL1BA==; 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:Cc:To:Subject:MIME-version:Date: Message-id:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Wc+gyAk+b/7mBwpVD7HMiBnBylVfscXY7tFWmaPRXUk=; b=dozmMzMMXq2xUloHAqev0FwBlf m4WWOBZ0KoJoka/8XeZ6/MBXKSJF0iATjVQxk8K++nUmk5HnRfB1RA4+9yCyRCAP6RgJkhqKS6RA0 jNunlC8XPt8c9PwMgMlyPJ9IZ3Y8Lzs6UZWeLhVSUoSx3PtKUcWqg0cAVOkqnkCrfd5OXy2UFiCzz rSnHuMcDLrn9UNwnjMChOdyaDr9SPZggaZ1Imt1/dmpEGguMm8j3aImTuzPvpDAd2rkHCnd+ad19t eguvXoW+9FXSHYAdH4imS9IywLHEczkKNWDsO/7bqbx5utKYrVjm0eF30kGJvQMM2Bbyd3QZqRIEc ngDTuRxA==; Received: by zero.zsh.org with local id 1rNOpf-0007kG-Nx; Wed, 10 Jan 2024 03:00:43 +0000 Authentication-Results: zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none Received: from mta04.eastlink.ca ([24.224.136.10]:38751) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rNOnf-0006yG-DU; Wed, 10 Jan 2024 02:58:41 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0S701PJ89YXQNO70@mta04.eastlink.ca> for zsh-users@zsh.org; Tue, 09 Jan 2024 22:58:38 -0400 (AST) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id NOndrPtX7tqGENOndrCy8t (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Tue, 09 Jan 2024 22:58:38 -0400 X-Authority-Analysis: v=2.4 cv=Zvoraf3G c=1 sm=1 tr=0 ts=659e07de a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=IkcTkHD0fZMA:10 a=gir0-LH0AAAA:8 a=dLPriUV9f7Mna6HnpHcA:9 a=QEXdDO2ut3YA:10 a=aLewGyoHDmJ4ULJHWpSz:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeitddgheefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnheptdeuudevtdehgfegueehgfelhfdtteeuteekffdvffffvdejfeevtddvtdfghfejnecukfhppedvgedrvddtjedrudelrddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudelrddufedphhgvlhhopegludelvddrudeikedrtddruddungdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepfedprhgtphhtthhopeerredprhgtphhtthhopehstghhrggvfhgvrhessghrrghsshhlrghnthgvrhhnrdgtohhmpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: -100 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Tue, 9 Jan 2024 18:58:37 -0800 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: proxy name for array Content-language: en-US To: Bart Schaefer Cc: zsh-users@zsh.org References: <41f9b4d6-8f4a-4220-a86a-b7ccf690bd89@eastlink.ca> <2546420c-deb1-4dd7-a0e8-7b9db463503c@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 29440 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 2024-01-09 18:29, Bart Schaefer wrote: > On Tue, Jan 9, 2024 at 4:54 PM Ray Andrews wrote: >>> proxy_assign="${proxy}[2]" >>> : ${(P)proxy_assign::=TWO} > Actually I just thought of a much more straightforward way to do this. > > set -A "${proxy}[2]" TWO > > I had always thought "set -A" would complain about needing an > identifier, there, but it doesn't, and the semantics of assigning an > array to an array element make this work. Sheesh, that was easy.  Only thing is having to chop it up into an array again: Run: LIST=( one two three four five ) echo $LIST proxy="LIST" set -A "${proxy}" "onezies toony threeatlast forlorn fivealive" echo $LIST LIST=( ${=LIST} ) echo $LIST[2,3] ... gives: one two three four five onezies toony threeatlast forlorn fivealive toony threeatlast ... I wonder if it's smart enough to accept array output directly?  Tried a few things with no luck. Tx.  Bart, would you please give me someplace to read up on " ::= " also on the leading colon -- for the previous method.  I have no idea what that does but it can't be omitted.