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.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 4127521E7D for ; Fri, 19 Jan 2024 15:39:01 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1705675141; b=GGIDNvx5sGlStLqb/5LqDyoVZFmcMpM/emPsRJpsnTYy7Cuycy8qk13nMoNWzhQLYBBp27zKi+ 4kj3OgMDE34EvpU24o8c8Xizi3bgpFYMfP6qiBWkcWbjYLNQLRWNxR5UJ0emOMak558hfcPkYO IpPDfiF2UDO5KIN5v3MDoq1hHCaWZ7dxMMwxLHzKm2kEiPH4/X3av/U/aRi89MeeTcDwVXbpxS 8er/oCN9VWoM70HPh4kw6zoULF/qfnN1JcuWUj6uPRzv2+tbiRfjnjGI4ehTWHYEP5v6wfT+8l /T5ONMG08FfOgLSB/+YH6Rxhv7XbhT45mW2AgOSmbP0H3A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f178.google.com) smtp.remote-ip=209.85.208.178; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1705675141; bh=T/b2rvt53izkXc9Ntm+brCjon6FcPU8jJlRwOLPughM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=XZQf3I3pOr7BfEHZN5X0EEGUdfLXdIkTpMssutkyDv4VjFI02U3ksp09MYo4Fg0eO4mlV61AcD jmx+GLHDSPKSh7DCwKUmifMW1e+f8NNEeTiw7Smnqq8oVEy4JmyOdbtr9LZlxds4o8MnSpl2wK 84VCvz7xeST5MS4Nec/FJHj/P+2ZQj/8yHn8vjLBjjTdb87e5ICkOSZn8JGEEgalb3XXkmLyzq Ni3h+mM4RPzVGUF9PZPcpGSGfjXGVMUGvhwWyuqYJFrmxZWOyJOeXZMIRt6gq1IS1DB5jWxzh4 Pu/v1d1kaAFCblCzvFdrwO3NdhTSLDNNF6GXhM1vfhLjRA==; 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:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References: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=inIv34EWbp+qPvSSmQv3OlmWcQvRpj5paPkFeKkOsN0=; b=DyGp6h4uJgSqK8oRwEEeRM78H3 WXNfmfO/al4DPuecXvPQocl+xt+4a2cFctjIwlytopw++tqWxnAF6c70IeNGnrSwPCPNMNuktucYO zY7YK4KoB1FzVl2SY+S7s+9hjCSwah7NfteBvc9eGFAkgb3k2dbeDObC0voVbJ7cFAGUdd0eXQVrZ yEnwGoo8LGlLPx3TWfuDv4hLNv6XUYNDjylnOtYkW8Rsl2gYVvopnYmlNWQJlqnTyHkzDx/OIzJX7 lL6xD7IImTMmfzBGfPzUAKboNVBvzq7Os76VcLAaqzZl88ucAqkRFJA1foBY5IL0sZUuzawstgllG 4FXxlC5Q==; Received: by zero.zsh.org with local id 1rQq1N-000PMN-Mc; Fri, 19 Jan 2024 14:39:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f178.google.com) smtp.remote-ip=209.85.208.178; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f178.google.com ([209.85.208.178]:44433) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rQq0W-000OfH-SC; Fri, 19 Jan 2024 14:38:09 +0000 Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2ccae380df2so9844191fa.1 for ; Fri, 19 Jan 2024 06:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705675088; x=1706279888; darn=zsh.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=inIv34EWbp+qPvSSmQv3OlmWcQvRpj5paPkFeKkOsN0=; b=T5ze1zvWt/HhUJ4vOj/vkchkClZgVAXtCQyCI/Mapf0YThA3QmUpeLNvqDCobFiqA8 FdhtTE5kvtduLQRFNIkFQZyDgvTSixsA10D7YYXzHyLaIaoB3UqNssYot0BR3p9SiI2E qwBwp5zfO3PnsN5PQKpmLLVU0JIjKhtyzNIfsIjejnOvIWOFQEdsv4gAYAxiPl33hwql bEB7Y/l/nG/OehpTtF6cRTA7P3QbploIXAEhtIc9Yf6xIJrh6pD4n67WgUKuaLF4S5S+ XrE7D2ArB3eftIGH4DwEO4o/TwT52uHJWuNe31763sjGwDxl9Edavzra2+zFiY7Jx4C2 4xMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705675088; x=1706279888; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=inIv34EWbp+qPvSSmQv3OlmWcQvRpj5paPkFeKkOsN0=; b=ts1rbRe8wJPtidmwln4K3IYkaQDPFE8dkEVxa7/03OJfgTKjTjfYxJ4GctmBO8wHkX VV2LE/EcGFCS+PZG7PRHHJzLKLNoKlWHaug7Pgr586pzSfFnTTF5UJWJBKu/k8PWApHu U8k8jBRMmHJxbLs5MtW+cgLwJodiZP+UisR+dnAjHMNvTE3CYR3rRZkONJtAwDgR0R2C wNfIRsMg3U7lBwVxz7WklQubxRmfXfI0gmwO5e3aAAAjaBMDX/lc5m1FcSiQtrCEDGbn LmrBWMZL7ROu208oZijo/qTD6JKcjqUmGyGcftKu5SFA1GwdAs4vmbhxxRv6Hj6wQRm9 Gikg== X-Gm-Message-State: AOJu0YzY4wl/BE1Y4EXpGE31IEUEacI1dlRNebzf1pNMNtJMZAWFkK8A 4cao2SIFDtIqnIGRtIi9vsc+gxe7K7oXIBEmAC+6oejjDVquhwdOt31wPjxcyHsXfmPhbtmhzxk 9SMMo72Rc/A3Xdhk21BAi3yVu0aqzom4R X-Google-Smtp-Source: AGHT+IHuOS6Oc8UHwhJ2/ghTQqzp0XxS2cx80Z3mGbgZBaGVsvfzK/mWoWVPfs+xFPb90B8OGqVVZVEWWh8o7AVUMGk= X-Received: by 2002:a2e:b615:0:b0:2cd:1327:c261 with SMTP id r21-20020a2eb615000000b002cd1327c261mr1605264ljn.33.1705675087801; Fri, 19 Jan 2024 06:38:07 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: From: "Mark J. Reed" Date: Fri, 19 Jan 2024 09:37:55 -0500 Message-ID: Subject: Re: Empty element elision and associative arrays (was Re: Slurping a file) To: Mikael Magnusson Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="000000000000b5f4f6060f4d6de2" X-Seq: 29523 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: --000000000000b5f4f6060f4d6de2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 19, 2024 at 8:46=E2=80=AFAM Mikael Magnusson wrote: > v Used with k, substitute (as two consecutive words) both the key > and the value of each associative array element. > 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. I understand that the expansion flags are generally intended to be independent of each other, but I wonder if it's not worth special-casing a few combinations to ensure the most useful interpretation. --=20 Mark J. Reed --000000000000b5f4f6060f4d6de2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Jan 19, 2024 at 8:46=E2=80=AF= AM Mikael Magnusson <mikachu@gmail.= com> wrote:
=C2=A0 v=C2=A0 =C2=A0 =C2=A0 Used with k, substitute (as two consecutive= words) both the key and the value of each associative array element.=C2=A0= =C2=A0

It seems that the `kv` is effect= ively 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.=C2=A0

I understand = that the expansion flags are generally intended to be independent of each o= ther, but I wonder if it's not worth special-casing a few combinations = to ensure the most useful interpretation.

--
Mark J. Reed <markjreed@gmail.com>
--000000000000b5f4f6060f4d6de2--