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 14260 invoked from network); 16 Dec 2022 14:15:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2022 14:15:13 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1671200113; b=aBzVi+aodd+HnfHFgug9nkDQdR1lnwXI+e5PanjxpRdGPCtfnO7ctZHEfPQ2d4UZiqObGngDMJ UJv9u0uAEj13+y0V8i4myztNzSFusjGDPQpZzzsxMF0/Ts8t/P8ugi1oLO9qlDWDaJEz1OtcNg ArgolAcVDJQTbGcKl70F/ZvEIo9cFX1VKfizqdOXTkMrmbNDXuiUvkfH8aS8mR7RtlFOw/25q8 oJydH+nLTZwxj/Fs1Sqc2PkmOR7ZtYJDWDa7a2BhX9vz9LCjJgoNcEaH1MCBMgl/dIvcFi547M nn1bPKHMeOT44s9BqIAtogyy9VXx2hkKMHAtYAyLw5/ERA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; 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=1671200113; bh=IUo6dxWoCL7lkAaKph5XjIlDUfMK3awThom3H5Nu6M4=; 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=gTInGffMJD3MMvAilnGN1gU0/1GkQUJUZ966z1eA++1bHZBC1sjdWKURCuDRimF+rfkVxzugv8 LVJ+W9k0Q7sNvka2eJxctwlKY6cXlCUwE6Jkns4oKqYkcs31U9fd5B/6nxjV3XTlUrNH1QW/Fp Ws1KIyYVxHUUFlJaGbKvdkr5kO9IxgXja+3lhpTrG5/D1vYKvdOSKnf5nQW0855vaSuix7q9/O gjBSu9GFtcpaVSdBdzXfmkcD2M7uCU4NTvzqJAdDScvGHBp683/cRZJ239QPqUKMfXtRPA3bP5 jaUo6lREAq02X0z0gnCnRYMlzyf9A222lUgj0ADHwIIlCw==; 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=sN4KHsN4AkAD4j+1PkOaj3tmUI8a/Y9MBvwvKWU3U7k=; b=NwDmR9Ortgka1NUDOy+J+Q9WGc m6paovqdVr8afmZtcPukTVaM7NphCTTg32JunWwe/bQe06lwhAOZirqivQRQl6KpKZ4QSoYhT1S+1 GuXbVsF8wvtRHiUZJv5Q8hgyTSfA44QuRzyfprMdLkfiu9BWwPqkmUxGkIQo85PiJpPZeGI1ZuhBz 2Yml32C6x3x8geOu74KOvXYmTxynfs0LSOnBk2xi3yKCoT3BjxhZ6ze46gwArb8uAslM2uBvNSMNV aHXM/8cEuuptARkl1gBCEbCEQY6e4SN3wRVoRtYW51UwuODSTK3c6hmC+Bh39QWKha8zXqMB/Rq+u VOOsHxWA==; Received: by zero.zsh.org with local id 1p6BUW-0005lF-7E; Fri, 16 Dec 2022 14:15:12 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:45952) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1p6BT9-00052D-Qu; Fri, 16 Dec 2022 14:13:48 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta03.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RMZ00C74JJTDIG1@mta03.eastlink.ca> for zsh-users@zsh.org; Fri, 16 Dec 2022 10:13:46 -0400 (AST) Received: from [192.168.0.4] ([24.207.18.108]) by Eastlink with ESMTPSA id 6BT8pgvGQEN8v6BT8pkCyP; Fri, 16 Dec 2022 10:13:46 -0400 X-Authority-Analysis: v=2.4 cv=IPDESCjG c=1 sm=1 tr=0 ts=639c7d1a a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=ILQfcpQn3jFaclIAr8kA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejgdeiudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeeitdejffevgfdtheeggfetkeeugeegieetuddtvddvudetteffvdevlefgueekudenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrdegngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <902fb047-3435-89a3-e7ea-74e74075c2c6@eastlink.ca> Date: Fri, 16 Dec 2022 06:13:45 -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 Content-language: en-US To: zsh-users@zsh.org References: <0c2b1f8f-35bb-cd52-3d22-0964a73945b2@eastlink.ca> <46161d8a-c177-4134-836e-592e5c048887@app.fastmail.com> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28557 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-16 02:05, Dominik Vogt wrote: > > The issue is not solved. You still have something that adds the > bogus values before the reinitialisation. Whether this has some > adverse effects depends on the scripts. (Sample script attached). > Basically you probably do ~ this: True Dominik, it's not solved, I should rather say I can put it on ice for a while while I attend to another issue more pressing. I will get back to it and I'll let you all know what I found.  It is probably exactly as yourself and Bart suspect.  I will catch it. Roman: I just want to point out that in general you need to quote the array expansion here or you'll get surprises if the array has empty keys and/or values. Consider this: typeset -A main=( foo '1' bar '2' baz '' qux '' ) printf '%-4s = %s\n' ${(kv)main} And the output: foo = 1 baz = bar 2 = qux ... this is exactly the sort of thing I was talking to Lawrence about -- not really a hard error, just some printout issue.  I'll pursue that.  I (think I) understand that AAs are very fragile creatures and as you demonstrate, easily confused.  I'll bag it.