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.6 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 28488 invoked from network); 17 Dec 2022 20:32:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Dec 2022 20:32:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1671309134; b=gwBDaPeUvjBvVgOt3XD3kNpNz4ebEh7SsW6+FDV4SmZJh0zU58cZxC8yBhnSJLUgygIc//fPHy 3+Z2UaZdLLy/hQaGHMqjgxlWJGFzE47eXDPcQ9EK/JiBHKXjtCIq9JuGm+jHtUB+LR15w/dmhs a2xO9/fNxnmni48uh0W8CS2crJiKP8eYSsbFgSUk7qygVjkzNzD4GomxO9vdJ3uoZbFPPMLcwT j3woRqO8qcCXaiKuzLzHw5D23O9Aqy968H3XV/9k85ZNyxLCqWuNSM1BXmBe8ixL+IuV9zoCGF O+S7hJxGtkATTnw0v+pJrJOSLHoL5pZv2ELi7IJtuvU9GQ==; 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=1671309134; bh=aRIBJYXoADDg6ARaKaUtigFtHwReh7QXH4q2fPBi060=; 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=VZ1HvBHu3htAnp6vuQy7fVaqImX4EzIrK4xNGZFAgc/SY90pZMg5nLTyPex3FQbtvMidHZTF3P jSe4GgZbGsOkKjM4pPBmwK5C2RH0HYKd3tmM8LRd//FPes2wUvHkBNmr9MfIvZKfvC9uJD5RnE VFII+hNqlrpXRYrMQIBMlFjYiNvhYqEHxB/4HBuLqOpuDH5wSrFJyBUtLnGygFSqSqhKpoe6UP 37c3Io1+BqE7WbSYX/BtNimE2C60H9NjQxD1m+SBqZoVEpYzbT/0o+fDjN9/IcCTpGvaPq22IC j5pbQRUZqScPpodXDTCfgSLvxx4Hp8E1dVVslmvjER0v0g==; 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=ECp6U6kWnWepK9wMs9AjA6ubCjkQTj4n+h5hGwUTtT0=; b=RGbNY7shhZdSiz6493r/x21Jmb 2PT9l4Vh368XgprjXjHzQisqiQAaljk+JnQwqnQDButabL9Ac1JS0cKTY77S40s+4SFYgu+0SG16l MZmmmhpUgoCYR8kebY/atsp9EJLRr9q9lxqjwtVSjG544hE7yo1gX5G6vZProbD9CD6UAPobBcuo6 hsyaozhzRQHS0tWmHTYSj1ig4T9VHBMtLmJFYuEhVigrgLgNl85IdqRG1rLAMiSL8ZZR+Xarb9LxR KKT8pyygiFKBUUBiWWY/GdlKSCooqWA4RfhOr6sopbtq40ACwpctb5Ft/qUyPKs6X2wNR9+jGPF+y wGmafQ+g==; Received: by zero.zsh.org with local id 1p6dqv-00021V-A3; Sat, 17 Dec 2022 20:32:13 +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]:35178) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1p6dqK-0001Ix-Ir; Sat, 17 Dec 2022 20:31:37 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta02.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RN100NYOW905PI0@mta02.eastlink.ca> for zsh-users@zsh.org; Sat, 17 Dec 2022 16:31:35 -0400 (AST) Received: from [192.168.0.4] ([24.207.18.108]) by Eastlink with ESMTPSA id 6dqIpkjQIEN8v6dqJpku1s; Sat, 17 Dec 2022 16:31:35 -0400 X-Authority-Analysis: v=2.4 cv=IPDESCjG c=1 sm=1 tr=0 ts=639e2727 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=bOh6lPnzgTwbk5FV8MMA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelgddufeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <2c606231-ae9c-a7cc-8e35-e018ccead14e@eastlink.ca> Date: Sat, 17 Dec 2022 12:31:34 -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: uninvited members of associative array To: zsh-users@zsh.org References: <46161d8a-c177-4134-836e-592e5c048887@app.fastmail.com> <902fb047-3435-89a3-e7ea-74e74075c2c6@eastlink.ca> <09d09690-08c8-4499-9011-9c45d7676f52@app.fastmail.com> <81952d4b-3ead-f912-f987-fe9a37dbd256@eastlink.ca> <27c7320e-7677-1268-3bf9-59939aad067e@eastlink.ca> 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: 28577 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-12-17 10:19, Roman Perepelitsa wrote: > n_input() { > local -A IN > set -A IN "${(@Pkv)1}" > } > > Note: > > 1. IN needs to be declared. > 2. Quotes are necessary to handle empty keys and/or values. > 3. The extra $ expansion is not necessary. > > Roman. > Right as usual Roman.  The next puzzle is why it was working without that previously.  I had 'IN' declared globally and it was fine.  I'll restore a backup and probe that.  Mind, it's better to have IN local anyway, so maybe I should let sleeping dogs lie.   I don't understand the difference between '-A' and '+A' maybe that's part of it -- the global array might not be overwritten cleanly or something.  But local is best anyway.  Thank you Sensei.