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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2282 invoked from network); 10 Nov 2023 17:16:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Nov 2023 17:16:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1699636581; b=T6HNCgYtwd3MvR6mAZdrpxwMXy0HDeGLCfpBRYPLRooPbCVqHuKSlOZZptPfyNfBimNxZSB9dO monu8VFxul37V3z83C8s1aaIevBh/xI03R9hBZG6TrpKAGgqeTTGtWE13hiihZ9nb2jI9z/zsY yGI4HjLW3ZqGK9K48EV2Gkfe/VMykNsL6qyRmM8uZhPivCl7NnFmtWRNT8tAOPf3wW+w3ZlkWi 2Hwe6MHbu8d67FejbV5dkW7Bzjaqg1ITIhXFm5LxxMu00QWC0+E8GCUU+h/fPNWA4dIV0QmInr NSnqQKCJ0KWyreogl16L4dfDn72wB3HEDFV8b/+8wttDVg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1699636581; bh=z79PWpZI3hpoKpUTRp6rSPtFgUfFmAckYACvtm+WxkQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=hHiH7qjm+pmD+4D8gNTAOw1phdtSONpkYf3eHC/gDtH7wm7ylXmE2fzPRFHQ4j1AAUHuhsCuqE OdpZQ9IyG/+YmvPRvrb1LbI591BdAx23gAQ9ti2mU2I1jayUHO6s26BHeR05VN2zncPZdJFIbB WNejGt2bJdnLznkBflY6/buD+Gl6jAGpa6OBCm5uwGgdnwX39p/jTQoo0Qap5CGSCWcnK3B4yV cztvcFpaP9nEvPO6hOebODDHibEDzhAXqHjNk+WCm0Gf8g1qp9qu5jx4vCNjmwYhfwHL6eFyVL i6S+EbFPwTwQaEc/pPzOvp36xIoCLQjVQ0du2ysTrK2Fhg==; 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=R2lsZYjx6j8GKRQw+8YhfRXUvFmCbO09HcKJM2jUcBo=; b=kNjgo2mlZXEMxXcTNo47ZTODAh 7dFhtQZJDZ6COa8lsHJbahpAyOYllwZohr3+4WjxKjIYqe5C4IbbwJp736LhSbo7yIDkgWZGBzvKm UBZDUmWAfP3Dsto/IP/PoQHBfktpcH3ydZ9odJkVKamwASwLj4VXLPSnZ4id4EP2X5twSu7sQ7XX3 wKjjBgg1RrWndBNRTueOiGusStAxUqbOx/dh9NY4WX8sFbK8wQJMJi/55j57svWHBijDOFzBevyfS 9KILVTEFiqzVapSyr1aFXPe80BzdNxl6Q5Ui4CCY3Vdo3L57rzGgvJVJEr/BM8YDd2l0TdxDAG74o ChgHZMlw==; Received: by zero.zsh.org with local id 1r1V7E-000K57-V4; Fri, 10 Nov 2023 17:16:20 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f54.google.com ([209.85.218.54]:50363) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1r1V6l-000JON-0F; Fri, 10 Nov 2023 17:15:52 +0000 Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-9d2e7726d5bso365624666b.0 for ; Fri, 10 Nov 2023 09:15:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1699636550; x=1700241350; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=R2lsZYjx6j8GKRQw+8YhfRXUvFmCbO09HcKJM2jUcBo=; b=2KD1QYPfoTj9tfE3xYpCc5Ez81TQKGq0DCKChu4GWKwVTi0N8EDHrDalCCCIcBs4kA /M3Cho5Xm+8tDqGMU8o+vuIigROP5CWqxkHhcJPVck1ypwLazsNL4SF5tEQDPBNmvPR7 LdrsnoEIOJIlHuUYvEK/uFRnciPsF78ob6McNDoVdjO5wMoSnfPu9pMQ/vnnVMsTYVJU xjqE29yZ+naOgCoY4hwH3nh7RWbsL7eaZCX+EA6Y71q9MA9b+PpbGt9IcMtjhOPuvJvb 7L7kjQv0k2JqARTfIYlsykqQXV376NRfP/1MJZ2VbkKAGkh/2Dg9j02cIWdKREnZQJ15 3cbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699636550; x=1700241350; h=content-transfer-encoding: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=R2lsZYjx6j8GKRQw+8YhfRXUvFmCbO09HcKJM2jUcBo=; b=jlb0VYmYYOA3vIRHTMxc4ZqwprmJNOEL7An8MDtwkYzpGigpTnT+u7Xq3KWGrZGbVJ CMzi7WJGrvllYWz3US1p/jAYmnGXajYb9yu1IwFsEruVqtNDxZNCnm62ZRphoFZ19lMP oJRxFOr9Vz20n64xV2ay28EChiqMP0j6rGQjdGnRNDX6a5tiCqAglsQP7w4ikd2R0wzn vali/ZqQtnk/dhVZIALm6krcrkRUW1EM1cQDIfcCpl0WOTrUdEPlABpUpon4ifO4yWkq pB2OVKQWS8rvrXVMTe/uRInRHE+fTX5GIxJDLHJYyRlpzZZHZLnvKaM5iSER863+1hvF kiig== X-Gm-Message-State: AOJu0Yz3kezYbfufVsPAHZrXbqnL0meEwVEjVn6PtJYI5cojwskh25cG Ce9Tvk66cu+reXKP6BEuBtBXiXiuexP4nOmZXUFVLl+nB+6zLFWg X-Google-Smtp-Source: AGHT+IE1A7Dr+5eI5/87RZdeJfm+t3GlISh+4c8tqBmfLzhT/HuJSqUWgx2zHV0siFuDfmDrms85ugCvB9uJENVuyII= X-Received: by 2002:a17:907:8691:b0:9b2:cf77:a105 with SMTP id qa17-20020a170907869100b009b2cf77a105mr7911504ejc.15.1699636550214; Fri, 10 Nov 2023 09:15:50 -0800 (PST) MIME-Version: 1.0 References: <3focki1mdsq59ji5d0u5nb7qenu6u8brkt@tlc.com> In-Reply-To: From: Bart Schaefer Date: Fri, 10 Nov 2023 09:15:39 -0800 Message-ID: Subject: Re: completion, sorting of options To: Thomas Lauer Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29342 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: On Fri, Nov 10, 2023 at 6:04=E2=80=AFAM Thomas Lauer wrote: > > From: Bart Schaefer > Date: Thu, 9 Nov 2023 10:07:16 -0800 > > > Combination of an unanticipated use case and the order in which > > features like unsorted groups were added to "compadd" relative to the > > implementation of _arguments. > > Weeeellllll, unanticipated use case... that's debatable IMO. Unanticipated use of _arguments, not of sorting. The anticipated case was that not-sorting would only apply to completions that would not be implemented by generic option-parsing in the first place. > Obviously > somebody thought that a no-sort option would be a good idea, in fact > such a good idea that there are two ways to do it. But what they then > proceeded to do was to have the nosort option sort just a tiny little > bit anyway Pretty much everything in completion is based on grouping related results -- files can be grouped separately from directories, etc. Thus sorting or not-sorting applies at the group level. That _arguments makes separate internal sets of options with and without arguments has nothing to do with that, and everything to do with the way "compadd" has to be called in each case so that in the second case it can match up the arguments with their options. It would otherwise have to call compadd once for every option, rather than twice covering the whole list of options. It was not anticipated that anyone would care.