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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1788 invoked from network); 17 Dec 2022 21:08:54 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Dec 2022 21:08:54 -0000 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-Type:Subject:Cc:To:From:Date: References:In-Reply-To:Message-Id:Mime-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=JlB3NEYmQ8QdFO8lSeUoKcw7OXcGS1O4obKnCuwiaAk=; b=Z5TEbPVLCSHF8qKyWkeDbspZiq vHoJimGYtPEeOFFUvEwO+jyJNytC2b7hhGPYyyP19BkP7dU0TmgO/VaE8UabClU3R+fsolu0S4vuZ cOkDKBKysG6Zd/a6CG76oES/MM60TLhFzq9GxKP9EXhYGW+eu9v+jcgcqu5MzYXzJTcaKekSC0iWa 1PfdJzsvk3M6J4KklcGZIWiqqJtIQ/dAFdurtmHONLpYr9coPYLvT5Hz3/MmvT90YCXUTSZTcNA18 fOx7FSn1CNV8X0PAun/qqsML7w3x5f/fG1MJWiE/yAw9APuw1V0kjfHctigjUwWX701pNXXsJ5pUb EzftsPAw==; Received: by zero.zsh.org with local id 1p6eQP-00055e-Sp; Sat, 17 Dec 2022 21:08:53 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1p6ePx-0004Ra-D3; Sat, 17 Dec 2022 21:08:25 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 7717927C005A; Sat, 17 Dec 2022 16:08:20 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute1.internal (MEProxy); Sat, 17 Dec 2022 16:08:20 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelgddugeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderreejnecuhfhrohhmpefnrgif rhgvnhgtvgcugggvlhojiihquhgviicuoehlrghrrhihvhesiihshhdrohhrgheqnecugg ftrfgrthhtvghrnhepleekheejgfdufeegkeeugedugefhvedvleejheeiueffheevjefg heethfduvefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheplhgrrhhrhihvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeh udekjeejtdegqdduudelvdejfeekhedqlhgrrhhrhihvpeepiihshhdrohhrghesfhgrsh htmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 55A4231A0063; Sat, 17 Dec 2022 16:08:20 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: <7a12a4c0-d423-4538-a194-18e9cf932fe9@app.fastmail.com> In-Reply-To: <2c606231-ae9c-a7cc-8e35-e018ccead14e@eastlink.ca> 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> <2c606231-ae9c-a7cc-8e35-e018ccead14e@eastlink.ca> Date: Sat, 17 Dec 2022 16:07:50 -0500 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Ray Andrews" Cc: zsh-users@zsh.org Subject: Re: uninvited members of associative array Content-Type: text/plain X-Seq: 28579 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: Bart already addressed the actual issue, so I'll just touch on this: On Sat, Dec 17, 2022, at 3:31 PM, Ray Andrews wrote: > 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. If the array is already populated, "set +A" only replaces its leading elements, which means existing elements can get left behind. % arr=({a..j}); typeset -p arr typeset -a arr=( a b c d e f g h i j ) % set -A arr {1..5}; typeset -p arr typeset -a arr=( 1 2 3 4 5 ) % set +A arr x y z; typeset -p arr typeset -a arr=( x y z 4 5 ) I'm not sure why you brought this up. Are you using "set +A" somewhere? -- vq