From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 53C682225A for ; Fri, 19 Jan 2024 15:58:13 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1705676293; b=ZbQFiBY5fpcfmi3EX8MmbetFvSG8Y2DGS63l0uhKQMFk0HyhN3IfgZ5t8YXkKjO1Aq58Yjf2DH wO+vFPHoLir6eQ4/uo3/jaFK7IhdOVFiM+I5cYKolfTs7bx/3Yak/YH8lqo7U2IyY5rlH2K0ML wpeNoGcJ80c+uQ9U1XauEx5u+D4BWU0bMiN8LABRGf8sIsiZ0FDZr4GOanvwSSbf/72+w3lXiG GnEjvuvfB9bZBa/sk4GGpXLBvu39ubtHmIcw15fmiYXdKiZOvwSn00RxSxGgDRLFQ97BLP+nCq 9Jl+iOmor5u8SHBo1vlNZUcox5prif9+Ndt9mKsb/CrDag==; 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=1705676293; bh=Z+71wf71vgvG/7Cr+bVdGssu6v4DS+sHfJ2DBJ6I/yE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature; b=L+1THtLPLxMT9jAsN32nNy82Xh3qbZCsigsfNu4BaRkOKdNBcHVJqbVkFGLc0gMwXWbvGZI0gD PgMGxlL11gApR2itKbrlC7cf3QF5oavt5QEimQj/AdXwd1PdF4Vi/ywkh4Nfzn1bvhgWEqdxd7 9Ip+T+D0XGWICrUOD1QD7ClgC59MMHPSPe1EL72/1GhkNDSwgtz1IaBMDSSiuWaQ5oIAwnjxap NpHVjh7O6ubqXOeCEecyitoKZnu0BE38XI4jeQEFxnX/BFX6c+4ei6bdKMKRZkkyCneeB2+pl4 Rj9yZHSlE/sltnjAIbXCvbl7iY6Ll7FU+nTbQ9BUqXbtiQ==; 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:In-reply-to:From:References:To: Subject:MIME-version:Date:Message-id:Content-type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=lyf9hndMbftt48Nu9qq7cbwwGhL2AAK/nce3bUinrbo=; b=BTjXI8x9ao/ypxL3OLyYR0EaFs o2DCq/xMxda06yO0hAL3NgD/9mrJDzMs2LDd86kPBJwHMVdLTOH23r2r9utFuqBzcMZ5D8W3aOSaX O8HNEAtifMEGJDdYKSjGXduxmHNy3UTVsa6ouyAsT2LENLKeu4AIziFhsnPJ3a3ZApaqeega8ptYs 704Wza89A9PKCrd6buCGetO0yt6/NT2VqJ31AjffJnbdc/IsTrlrsrgH157UX2SwES/wcULCy5LQ5 fUMmMyuESHw+1Psj4NhmpZrwCaGsuESOaNADIn8+dUGw1fQOS3Kqc/QWdbTPNnifK/PAEUSx3lkgG 94VlLA3w==; Received: by zero.zsh.org with local id 1rQqJx-0001Eg-Ff; Fri, 19 Jan 2024 14:58: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]:38377) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rQqJO-0000Uu-TO; Fri, 19 Jan 2024 14:57:39 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta02.eastlink.ca ([24.224.136.13]) with ESMTPS id <0S7I1E7AZK1HR4T0@mta02.eastlink.ca> for zsh-users@zsh.org; Fri, 19 Jan 2024 10:57:37 -0400 (AST) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id QqJMru8pktqGEQqJNrIMer (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Fri, 19 Jan 2024 10:57:37 -0400 X-Authority-Analysis: v=2.4 cv=Zvoraf3G c=1 sm=1 tr=0 ts=65aa8de1 a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=PEi1JdM4iAIIFeU14m0A:9 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=aykORUaBWMNYI9sIAggA:9 a=h3N3XT5TkMfYOY8P:21 a=_W_S_7VecoQA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdektddgieelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrdduledrudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdduledrudefpdhhvghloheplgduledvrdduieekrddtrdduudgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------uDGGC0fyMZ2Vw0Eap32tRbtt" Message-id: Date: Fri, 19 Jan 2024 06:57:36 -0800 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Empty element elision and associative arrays (was Re: Slurping a file) Content-language: en-US To: zsh-users@zsh.org References: <7b20b425-59b2-466d-a9aa-a2768d1d4633@app.fastmail.com> <4b475319-ef78-4d46-a62c-27c3b0af3ea4@eastlink.ca> <49702cd2-814c-4461-9819-cc2b85bd3ea2@eastlink.ca> <50941e8e-86e2-4e89-8644-c863f846e805@eastlink.ca> <20240119102755.5ma5psbccsuo5ohj@chazelas.org> From: Ray Andrews In-reply-to: X-Seq: 29524 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: This is a multi-part message in MIME format. --------------uDGGC0fyMZ2Vw0Eap32tRbtt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-01-19 06:37, Mark J. Reed wrote: > > > It seems that the `kv` is effectively applied before the `o`, so you > get the keys and values intermixed and then the whole list sorted > together. Hard to imagine a use case where that would be the desired > outcome. > So it seems that zsh already does intend the ability to output the array in a declared way as Stephane showed (hash tables notwithstanding).  Thus it's simply a matter of making that work as it proposes to do.  Couldn't ask for more. --------------uDGGC0fyMZ2Vw0Eap32tRbtt Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2024-01-19 06:37, Mark J. Reed wrote:


It seems that the `kv` is effectively applied before the `o`, so you get the keys and values intermixed and then the whole list sorted together. Hard to imagine a use case where that would be the desired outcome. 

So it seems that zsh already does intend the ability to output the array in a declared way as Stephane showed (hash tables notwithstanding).  Thus it's simply a matter of making that work as it proposes to do.  Couldn't ask for more.
--------------uDGGC0fyMZ2Vw0Eap32tRbtt--