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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2669 invoked from network); 27 Jul 2022 08:22:17 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Jul 2022 08:22:17 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1658910137; b=B+KM7I1rVkBPCyhlBP+TCIWr4puU0iZrbNffn0l6OJShyUKNnSUifUCbqXfENkTYuoOqyuXxoW 2X5/gIXO0J31zIc2EuSQ8VgJYnh3/XvykIgxXamdIIJn5CNuEqEabTjBMZz2pI/lt4HVAc82e2 puo3evhcXyl/xTchhhksPBfnfg6RDlfneqJbhH3wp1ZZHJqoKYCQEg70gPEK3nksaoeNHwDWks XBCq2Xi7qu3beUWtAnEBSht9nIp8bIXjmdpEK8WR2jnrCYUgOoYmARzhy9qmzdvjzoWa0369v0 OCY6+yvi+1sUOcJkLpoH0alI0KDa1WiuYWZm8/uet3uAqw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1658910137; bh=UQpzVm2HjHaXO24QjYTLuLnjoPYWNDbE6+Xnspv6qic=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=sdBDvh2POXORlKEBPjbmbLthPg0XVYNFNl7YK0OmqJaPhh2op/I5REyXgjoid2mTEh1V+ZuH16 wpjgOVMYxkopcoD706bBdBYKUbfW7PZhtUrlDkxIxtN/xvw4qm7BgfTlA6qsr0B+qb7SyFj6bI aj2wQhbiSOLS8gGpI56OjwkqyJQzVe5Po7c/FCXy80kgrkpyTQQESKzYb1rkAjPmKu00C0k+q7 Bh0yHD1jCzkW3JsYilO4JyUyLonAiImoGyQ296V1dfcbzvin6KBs7YEubPQKi2G0JTBBPcnMdP qrqDCUlWLTpzfzAYq4QlsoEBy9Dvte3YP/x9tfqt0EXaow==; 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:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=8bcZbT+cGlDK9BFQM9Ss7zxXyDwlE7K/kgTGX3qlzic=; b=HmkPedtgRsNt9wLPZ2Q5wYggSO 3CzQDq2QEeCKADD9nIC/fnsND1v27geOyO6Sg7M+jWe4TEFExPHJygeVIuEipgldHYUT5A3sNXh4E PrjklPu0TEw31L2lRrXWpDIysXNjyHS6FOXv0zvrvTlXc3J4UuFpwdg9smSbeD1ATJzVmvzIO7Ymw FWf38979TXMrZ1zmZxlscBzCm0Yx+fnQz7xVIBeZnpS8FQYL8ladmzBWqTjJkS2s+tKdyNz5zHGkh 2387QscGI2FeLgn94F2DGlcZ2uu4pm+7rsQ8S3mQHOsiEA9Z/sj2lsuVpVUcKJYlO5ES5taLQgtkp sv6d4pIQ==; Received: from authenticated user by zero.zsh.org with local id 1oGcJ6-0005wQ-SR; Wed, 27 Jul 2022 08:22:16 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:36146) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1oGcIn-0005aR-EL; Wed, 27 Jul 2022 08:21:58 +0000 Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net) by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1) (envelope-from ) id 1oGcIn-0007TF-27 for zsh-workers@zsh.org; Wed, 27 Jul 2022 10:21:57 +0200 Received: from oxbe8.tb.ukmail.iss.as9143.net ([172.25.160.139]) by smtp1.tb.ukmail.iss.as9143.net with ESMTP id GcImonLgNVu5XGcInoUUle; Wed, 27 Jul 2022 10:21:57 +0200 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-workers@zsh.org X-SourceIP: 172.25.160.139 X-CNFS-Analysis: v=2.4 cv=LNR1/ba9 c=1 sm=1 tr=0 ts=62e0f5a5 cx=a_exe a=pgSR3NrKiwmx/6vnWRL19w==:117 a=1DWFKdCB1IcA:10 a=IkcTkHD0fZMA:10 a=ZjyAdWuDOD4A:10 a=q2GGsy2AAAAA:8 a=zyeemGVU2hyFFNc293UA:9 a=QEXdDO2ut3YA:10 a=z9dJwno5l634igLiVhy-:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1658910117; bh=UQpzVm2HjHaXO24QjYTLuLnjoPYWNDbE6+Xnspv6qic=; h=Date:From:To:In-Reply-To:References:Subject; b=30tIxHFUB+Zu+KmAYIpx11hbSqD7o4aONUC/zS7wxQQplj+wWbqk4D6bDdSosHNrD p1jsjNxmNv+tiXRVa/lslDvB8gAFqASe08ntTacsM7x9IFmL/gMS0/VB1veHD5s4Bc jy1tO4NAUWMqFqdUYp/5TEXTFYSm0Qmo/iSw38oKYcedTOwTI4pXbZLb8rv6+mdZa6 KvZSyteX06U8PmWE2hui5OPVqmsIZnhSMoa3hYCl9lMacwhXq5jv5hAKS6qDwIOK30 4K6jnn2xlyRtxqUQ+2inEEiCu+1Lgwz3zFWJVNFX4WiR61xPFOEPvpMY4RHi1qu3fa s4Ol1TdfvTLVw== Date: Wed, 27 Jul 2022 09:21:56 +0100 (BST) From: Peter Stephenson To: Zsh hackers list Message-ID: <1689193830.64958.1658910116770@mail.virginmedia.com> In-Reply-To: References: <1174358605.42447.1658853176256@mail.virginmedia.com> Subject: Re: [BUG] ksh_zero_subscript messes with associative arrays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer X-Originating-IP: 147.161.224.167 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfJ+Jm6ut/qqAiw3+kkD0/F6nDhzfbqdfmJemUqlaZtw3EkPQOE/iDgbNS+WjU9n0b3KUWTI+9ksisBFOCak5f931BsVJvz2AUBYKP/3k2OwC1T7bcHDX W8HgD5lefXI5cK6xE9C5oee4Nx7RHc4eHqX4ZKHypi3uqV4EhKgkGuEop5N410EbG6IFnwrHyeM4bChQ6WW83Zcp1+Pn8gCefu4gJGD5HueyNgv4JebKSBFu X-Seq: 50430 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: > On 26/07/2022 18:10 Bart Schaefer wrote: > On Tue, Jul 26, 2022 at 10:00 AM Bart Schaefer > wrote: > > > > Something is tickling my brain to the effect that this was left this > > way for bug-compatibility with some version of (perhaps pd) ksh ... > > More of this comes back to me ... I think the situation is/was this: > > hash=( [Y]=why [0]=zero ) > echo $hash > zero > > That is, reference to the entire hash without subscript returns a > reference to the element with key "0", just as reference to an array > without subscript returns the 0th element. > > So there's probably not after all a connection to other unset > elements, but I think PWS's patch will alter the above behavior as > well? Yes, I remember this oddity now. However, "echo $hash" with only kshzerosubscript (not ksharrays --- with which it would be pointless) echoes the full hash, so no change here. But I suspect there are other cases it does affect. Do we actually care? Could we just document it? Or is the effect so small anyway it's best to leave it the way it is and note the oddities with hashes? pws