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_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 08FDB21776 for ; Sat, 30 Mar 2024 16:28:29 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1711812509; b=LvnqNzYLzu9EYkyTG6KVy+x3M5vg35CHtfIEiDvpKPeQ+w/4M1GeJuBF2p5mnpEJKfXfoEp7z9 g2eaRffzVA0wMDT+1Alqn35kFCfLUgQ7H0XP2svqV0g4AzccO3JejvGajT6JR0KF/t5/b22SWc 5NM1aeDmped2MU0yjF48MQ2EuDJEyr82NDr9SjbGYEJWqc9MKRnCEg6r07eG2jOshWEqJzcGnj ufCguQQLDSMdzzsSpltBcBfx2We3qoPa4VFKz8/TX2FaUuJzNaeHlEBJ7F55FrQqr9J42p3hSU rjg0IrJwdIW0WHf/eCAGWTwyPFLiAh3Ze+3QiNiViL50Ug==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f44.google.com) smtp.remote-ip=209.85.218.44; 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=1711812509; bh=FY7n0BrEqt1853z7Gdw+b6fZGLaHdueVuMx/KC0JUno=; 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=EiGQ6kFtDTy5HvPZGAxagyaaDTCb59YdZ1gFhgkIftVKX5EColBnA8UEumyPXkDoShMZNAyeDX kEy5RhmCniWGXXciMlZUlFQ81sX3IkN7dkRS1OWkgXPr499FDJ/tFF3s59muhmfSoB8LMxUh7C qt9bfdttlJQA1eEj2Pqo4cWKzbWGc7sD7L4NfLsF9TGxwS72JEbBHsM4dsIImJOzeINr6eauOv 2v1dVk5qIP6O7ojQLi/hUa9UHoSK7EVa1en/oK0cOKIgxiSBj42yB/oWPOcY9M5wXfe4Z1H0xr qyrhHxv/LrXAmBTFETHzer7LiTxcEHVKPAINsvvzI6hgCw==; 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=FY7n0BrEqt1853z7Gdw+b6fZGLaHdueVuMx/KC0JUno=; b=bpupcqiJErq5R46NlwqzKu/Twf ysoMyy77vY01mpGiD1hRPdsQIND8bSefEGI07/+hbOQZF1RDXUa/5FVOgonVn0TGfoqtoQBy1qSGN 9+aA6QpHyctvBB0zfscPz2/zuu+Dk/CSDx8PWxHA3Gb3E84XG0wGv0wPsUnULiSKmzntZK1X5Xt3c jDoFwgu89CaL4NIL4Yjm7DsYCjFOiVKlzoEzNN6JniL4/LmTxi/49Di1DUDIWFFM6/nRowE0XIw8P BpdTgGGOio1sOnX9Aj2s0KX9lXgOhO3V8K2InSMH9BOC5hEg8cYAacnHruEzSw1Sc3vwnK6EI0n+/ YK8ZtH5A==; Received: by zero.zsh.org with local id 1rqadB-0009Hb-9u; Sat, 30 Mar 2024 15:28:29 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f44.google.com) smtp.remote-ip=209.85.218.44; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f44.google.com ([209.85.218.44]:55674) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rqacs-0008xb-86; Sat, 30 Mar 2024 15:28:11 +0000 Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a4644bde1d4so360145766b.3; Sat, 30 Mar 2024 08:28:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711812489; x=1712417289; 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=FY7n0BrEqt1853z7Gdw+b6fZGLaHdueVuMx/KC0JUno=; b=CHFL0m8MAKQuz064Cjg+qVk0KahQO8eIxnXuZ13APY33Qn6jKkoNpduv7VO66NLt8c bAAvrbuUIef2ZT5PFdfca/bgA0PWiczbxtjSSi4Y6TeqgKiQYvakgGAMAJDGYTtA7C9I DVLHcTVYZQJmVzesI8uD06camXyGoTJywPmVt1mz5u1wsAE88L9ZJBtpwGmxlwBmNYxE x9aq9wJVbJ2MEmoQoqR6gPGxe22nvm8krfAzyNaOy5FF6TGbohfAM8oR3IzL2+mwvcXk vwuFerHsB6CXqTSytgQ3V32isBfHR2ePBGi8kd9M5kgThXQXWCBvclbmKLR18VV/yTQO x9Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711812489; x=1712417289; 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=FY7n0BrEqt1853z7Gdw+b6fZGLaHdueVuMx/KC0JUno=; b=H4MpKjQ8Gko4QXzIjZ+5mrSyL2zfiPHTui8BceOQNEbHx/dWTmiTSCJ1vVpSf//DDo znVtNanuozX0SjRuI5wuwFHJUEjuHIqhKGh3/heGm3j/pjhL4V8Wstj9MYPUBt/b9LEb MtlwkzJgHyDsXfTNYtOt4e/Oqgdtl1btqcy7oh2+DRfWYBBfVBE2omVNkLsnRJiTQn46 Lq6IwzEEV3IjKLKucMUTQOP1toPVuAAO0rAK1QfgXATgE54V50Ow4YY6OgwBw4XXdRHb l0T86yeznpIDc50olQAjnw8ta5vDzyS3B0MLQ0G77YNEpbLRcZxMTEbNxPOp5sxhGLTQ mFWA== X-Gm-Message-State: AOJu0YxpzWLj08gc+PMd2zrP+FoNaFjRm2//L3+aJ2lhK9HiEP8ifPTH nEisowbhpTvOzdNw4KKSTeA1a0Zt0YK8uXDo820Oe48mfmnKwZOHkuWxgpRDYAGG4g3i1FmQG7N 1PZClZ5eRr/E3V19M+CQcJ+jB819TkOoptTI= X-Google-Smtp-Source: AGHT+IGM0NaMR+ETrHYRIKuwHTKCUuqMA5bFBZjz5uqh+cR9jTaCXH60tvM4ZpUETfdc3nXcvw9IXrl2apSv3HsXhIo= X-Received: by 2002:a17:907:7248:b0:a4e:4350:3b3a with SMTP id ds8-20020a170907724800b00a4e43503b3amr2137074ejc.60.1711812489092; Sat, 30 Mar 2024 08:28:09 -0700 (PDT) MIME-Version: 1.0 References: <5B64A18E-CDA7-4C5F-8CA6-955832F23E77@gmail.com> <48504-1711741389.669599@M82Z.uugW.8LDU> In-Reply-To: <48504-1711741389.669599@M82Z.uugW.8LDU> From: "D. Ben Knoble" Date: Sat, 30 Mar 2024 11:27:57 -0400 Message-ID: Subject: Re: bug: _files depends on extendedglob To: Oliver Kiddle Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52861 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 Fri, Mar 29, 2024 at 3:43=E2=80=AFPM Oliver Kiddle wrote: > > Ben Knoble wrote: > > > > In the linked commit from the original mail I explain the emulation > > mode: it is because the contributed Git completion script sets the > > emulation mode to ksh in order to leave most of the work to the bash > > completion scripts. I therefore (assume I) have to revert to zsh mode > > for _files to behave sensibly: not doing so produced a strange IIRC. > > git doc is not an official git command so I'm not sure whether what > you're doing falls within the scope of what that contributed completion > supports but if it does then forcing ksh emulation on your function is > arguably a bug in that git completion. Correct; I'm adding completion for a custom command (implemented by a script called git-doc). I think the author would argue it's by design, though it does make extension harder (unless you like writing bash completion scripts). Author's post from 2013 indicated some performance issues with the Zsh-provided script (https://felipec.wordpress.com/2013/07/31/how-i-fixed-git-zsh-completion/); have those been resolved? [The post itself seems a bit inflammatory, so please don't read its tone into my words.] > I'd be very interested if you could elucidate on why you choose to use > that completion instead of the git completion that comes with zsh. It > is perhaps faster due to reduced functionality but in wrapping the bash > completion it has a much more limited interface that prevents it taking > advantage of many of zsh's more powerful features. Zsh's completion does > support handling additional commands in the same manner with, e.g. a > _git-doc function. There can be benefits to upstream projects carrying > completion functions but I usually avoid anything that wraps a bash > function. See https://github.com/benknoble/Dotfiles/commit/9c7dd6d1ec8b3caac670f1a2a0= 30769a4c90c06c and https://github.com/Homebrew/legacy-homebrew/issues/16992: the zsh contrib script from Git is installed in a location such that it supersedes the default script. At this point it's what I'm used to, and I haven't spent time trying the other yet. It works well enough for me at the moment. (Perhaps it's less a choice and more a "default" that works, where by "default" I mean "that's what my package manager did and I don't have the time to fight with it at the moment.) > > > reason insist on doing this, then you can setopt $_comp_options to > > > > That=E2=80=99s probably a much better workaround than what I had, thank= s. > > I=E2=80=99ve confirmed that it works. Is this documented anywhere that = I can > > rely on? > > That's relying on internal implementation details of the completion > system so you can't really rely on it. Bart indicated it was undocumented but deserved to be. --=20 D. Ben Knoble