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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 566 invoked from network); 1 Jun 2021 05:33:25 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Jun 2021 05:33:25 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1622525605; b=Xo5DSREF6Y9jJIIFzB0/nYG4vyZV5uZBe+DR+oZYUUMRIFDScqFNWDkABnSyYJzebac1znjvzT zaE3JDQ64WPo6JVi1Ozi95Y+1wBvXhL23hQsU+Jq8BHnN3Iyb4sDm8B0pkvbyhKWhDICEZx7DS mIkBOYbxvdpp5sbVX+goVp1mtREjsajNQrPego9gM5W3nD9YdzZVpajGgZhZdAE6j2eXLYryIO 5nCIIlMrwmIq0SchL9sTH+rvNtbHkXxMNDWZAAO2Ik6N0AJq0KIPWfJHafUUufGc/dpC3HtFWx QdG8hJCZdhFv2aNK+ukIrckd8mHOVnWqIzwov49lERO8aA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay2-d.mail.gandi.net) smtp.remote-ip=217.70.183.194; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1622525605; bh=S2Dwd/kvLvnuCLCdPePq7bfgoohSQDltmY2t/jB61J4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=hu9dyCOXJTGNWKF25IjrHf6Y1fHvJgwSGpzHp1mv8XBKVVnxrHLzgiChoF8jDCAskSB1WCRU45 44oT1s31BpmSI8+lPA/1tN/b72JuiYU9/Arc8DVTzph7vM94Edq9Uu0h5WSsmAjgctM5oL/aFu uSe3zflyMuaKHUkOjlhdo8Y3+1rK8XpxbKqlKtEK5RpMuuTLe2H/aPrYStpCm4QtYoPkpZU1Ay 1Ps1HPfee5zsnWI9DpoHSX7MJZjClT4sSL/psmJTBDU/TrX0Fap6v8Km1zTbxEx5pmVlAdgJTa tLeeRVnT/v/XdxYnd8mO1rNCKYCbqCaEeaC6AZbf9N66Vg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=KvnyewU66LfHDmVD0/yTZl8odzGCN2l3LZh0VifUSLg=; b=ayw8LuR4C73iCovwtPWVmcfOBn zM+dZZNzzsEitiugs8Zb7mrhceTonea4p52ZpDWSoe4J0KMbMRhXODtWpRxMDpLdlm+4riPDzasP/ vd4KtrDA5rcFCofsoza8A18gztZaGNwtgxuLK8aKqyX64oD45V+QyKKhYvD+qWvgTt4VJCURXMs+9 D6/4cUrh2ichYgD3fAjdAFDyaXqKIbYf4FNpz5phy/DLV6KDl5nIQTP4jBOzJowsg0QT5sr3WBIvH EDy72Z1Q8qMd28cr+fbvKVEqb/BhlMQS3feKjK1GdmGqWoSs28pgjbsTlXGnzRhJOQGko77xgw9OV YH2DEUeQ==; Received: from authenticated user by zero.zsh.org with local id 1lnx1m-0003r1-E2; Tue, 01 Jun 2021 05:33:22 +0000 Authentication-Results: zsh.org; iprev=pass (relay2-d.mail.gandi.net) smtp.remote-ip=217.70.183.194; dmarc=none header.from=chazelas.org; arc=none Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42959) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1lnx13-0003Sm-Kp; Tue, 01 Jun 2021 05:32:38 +0000 Received: (Authenticated sender: stephane@chazelas.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id EF90B40002; Tue, 1 Jun 2021 05:32:35 +0000 (UTC) Date: Tue, 1 Jun 2021 06:32:35 +0100 From: Stephane Chazelas To: Bart Schaefer Cc: Zsh hackers list Subject: Re: [PATCH] (?) typeset array[position=index]=value Message-ID: <20210601053235.b4junj6muuwegl7b@chazelas.org> Mail-Followup-To: Bart Schaefer , Zsh hackers list References: <20191216212706.i3xvf6hn5h3jwkjh@chaz.gmail.com> <20191217073846.4usg2hnsk66bhqvl@chaz.gmail.com> <20191217111113.z242f4g6sx7xdwru@chaz.gmail.com> <2ea6feb3-a686-4d83-ab27-6a582424487c@www.fastmail.com> <20200101140343.qwfx2xaojumuds3d@chaz.gmail.com> <20210430061117.buyhdhky5crqjrf2@chazelas.org> <20210505114521.bemoiekpophssbug@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Seq: 48976 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: While we're at it, could we fix: assoc[]=x unset 'assoc[]' etc. The former can be worked around with assoc[${-+}]=x or assoc+=('' x), the latter not AFAICT. See also worker:43269 https://unix.stackexchange.com/questions/626393/in-zsh-how-do-i-unset-an-arbitrary-associative-array-element/626529#626529 unset -k "$key" assoc_or_array or: assoc[$key]=() Would probably make sense to fix the issue with escaping \ and ] bytes in there unless we're happy to break backward compatibility and make unset "assoc[$key]" work whatever the value of $key (unset 'assoc[f\]oo]]' for unset the element of key 'f\]oo]' for instance) -- Stephane