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=-1.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,PDS_TONAME_EQ_TOLOCAL_HDRS_LCASE, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9610 invoked from network); 28 Mar 2021 08:08:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Mar 2021 08:08:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date: Content-Transfer-Encoding:Content-ID:Content-Type:MIME-Version:Subject:To: References:From:In-reply-to:cc:Reply-To:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=dCpNIklmQWn9+Asv36Z7fBjl2QPZbN8QwawIekZesBI=; b=YlVNJPowvSsFqRVYrr/ZA7+RGt Fg6tvkz9leGE7pRso2EYSpiuqGczi5iIipQVWrR2bDFo9tqG5sPfWYA5Boo8LelFqNXMv62Pzn+nY X8s6FwtUnZYHX+LInEwuX9bztfQMrcdBjL75QS9vL7vdD4efQVjUtDsNCPyrCM0pcgQo5xvfxYnao DwIm2G4pB4R1yhJVKzSYsL9MUGFOesQbAeJLuu0XjzIGjWlWosE8aFh8MRYLodv01LBEVlV/QrEsr /cpuL4eZlOQZZp6pYALw5W2aKtvvvBt9mRuS9Hrv12qFosy4youUvufVubiup0m+WibrzblTRCtq5 n/T5RVJg==; Received: from authenticated user by zero.zsh.org with local id 1lQQTF-0000ir-0B; Sun, 28 Mar 2021 08:08:29 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lQQT4-0000ZA-55; Sun, 28 Mar 2021 08:08:18 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.93.0.4) (envelope-from ) id 1lQQT3-000FUl-72; Sun, 28 Mar 2021 10:08:17 +0200 cc: Zsh hackers list In-reply-to: <1C958552-603A-4716-8D4B-EF1EDA6D304F@dana.is> From: Oliver Kiddle References: <20210327210826.GJ18178@tarpaulin.shahaf.local2> <1C958552-603A-4716-8D4B-EF1EDA6D304F@dana.is> To: dana Subject: Re: [RFC] Case-insensitive path completion in _git MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <59565.1616918897.1@hydra> Content-Transfer-Encoding: 8bit Date: Sun, 28 Mar 2021 10:08:17 +0200 Message-ID: <59566-1616918897.215402@6qHq.M4f6.Ov84> X-Seq: 48285 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: Archived-At: dana wrote: > I recently learnt that ls-files actually does support case-insensitive > matching using the following syntax: > > :(icase)/foo/bar/baz That applies to the whole path including the directory components which I don't thing we'd want in this case - but correct me if I'm wrong. It doesn't appear to support /foo/bar/:(icase)baz The only reference to the feature I could find was in the top-level git.1 man page so maybe the syntax is different. You can also pass --icase-pathspecs or set an environment variable. > 'git ls-files -- /home/dana/linux/'*Kbuild*'' ran > 1.18 ± 0.04 times faster than 'git ls-files -- ':(icase)'/home/dana/linux/'*kbuild*'' > 2.60 ± 0.09 times faster than 'git ls-files -- /home/dana/linux/'*[Kk][Bb][Uu][Ii][Ll][Dd]*'' That doesn't look too bad at all but I tend not to work in big trees like the Linux kernel. :(icase) may be worse for a deeper path where it adds extra directory matches. Did you run these benchmarks on a case-sensitive or insensitive file-system? Strictly speaking, we should use * and rely on zsh completion matching to do the filtering instead of giving git the contents of $PREFIX anyway but that'd really slow it. > It could still be gated behind a style if it's a concern. I don't think thats necessary. Committing as per the original patch seems good to me. Oliver