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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31552 invoked from network); 14 Dec 2020 10:25:23 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Dec 2020 10:25:23 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1607941523; b=XYtLlXvHEkz8f07p+ZSRtF4nnkNWWgzjinRMw46tJVXKdoRgTSuNMznDRlqtTUdsAD/95DSpbH KyDzm43m2shTKVme512TWw62fFC+yDEuUP9et4Bwut1yWESt1+GixBFcviuWxAfxsyi5fCxIjE dhVu8zRyT0iil2Rw620zIMRKcxHc2XQhWrClg7Zcxk7oBIGmOipZNJWPhmEmOO7ntQwrB5yav6 8UXbWUztljNTagCw4ekzKXmuFG79+OAp2w3apaTx7omUju77t2aFglWxIgA3UYdZozPZ3cgFRW ODVKpuYsYY9M4fRtWPSjWwfE/JKkRicLWBoa6Vo9piixdg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f177.google.com) smtp.remote-ip=209.85.166.177; dkim=pass header.d=dana-is.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=dana.is; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1607941523; bh=LFpcUT0GZY3TnmZhvqCI5smkUAUhAFXHZgsitRceJwM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature: DKIM-Signature; b=pTQXXYZ1p9beIJrldao84IVO/uEnGYTRflJkdLrckx1Ggxh56Xu+ntM1qQt5012k0B8fxotgFK NpBNsZLPnRHNrOaj0eGtLu7+iiqqTVhIY1r21UuO6lhIxZo90qEd5QSFzjPPndI5xtO8GJhWrQ IMMM6g1de8CR0MY/PoV9jhNbENzOqzA2pP7b7F0JUyCCkIB6tlcVqEM8D6gkhVin52IIPP8jvB gXOwBxkg7Eslp2XrkyOay9mrgV3sp1AVgVZAbCdTPiFdEyslCshQLjhIxCbS+JMBdBoMcO0fob IDesYYp8tsBHp2UVd1nUc/3xX3QeCKLNKyAa+/7TOqur/w==; 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:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=LFpcUT0GZY3TnmZhvqCI5smkUAUhAFXHZgsitRceJwM=; b=SYIJn1WabewAo3JMK8yJ40U1d+ uGfNbVoziZo/YSdaV6+VK1hS7gF1ShcNFSN6dnar4/9eYDL0BOOU/6Q7o8Y/2biDcxwTX61778O07 TMwJDC7i3ligt61QzNbt/LoglAJpYYIGRzfRY+Cy/e/Kcet/mzcmm6y/TFKFrgOq7pl9azryi/DGB ndGtk6HOgouwiqeBSDyHsNQhQZodCxqsF70aEc35XHEVG05JtPO8sDWHOQzfsjQEviFaQaFGUMyvA VLAwyTqMM6+OD7jVCW7z/qF+UHlAihVfpT8tahwYqF0bh/dUOlYo6Z0LKPaHYBGFcAYanldywwzCa WQTuor2g==; Received: from authenticated user by zero.zsh.org with local id 1kol2g-0002Z5-RF; Mon, 14 Dec 2020 10:25:22 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f177.google.com) smtp.remote-ip=209.85.166.177; dkim=pass header.d=dana-is.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=dana.is; arc=none Received: from mail-il1-f177.google.com ([209.85.166.177]:45486) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kol2U-0002Q3-Hf; Mon, 14 Dec 2020 10:25:11 +0000 Received: by mail-il1-f177.google.com with SMTP id p5so15320107ilm.12 for ; Mon, 14 Dec 2020 02:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LFpcUT0GZY3TnmZhvqCI5smkUAUhAFXHZgsitRceJwM=; b=pjhhRG7xjn173Ndn8YLpN8nzt2rNK4BYkH3ARdNK0wP2dalfVTPGgNmaS76c31mUVm uj/QyrmkYJ9bQjbc3i/L8Ke3NMAbK9/5FNZr6BYEIS33Qn16nWUlUHipZRK4wB52548c RMOxXTO+9TfgWH0q4tmO40sqhL2DiHWihKsUxgQFP3JsPRjKU2AD83V4Sz8UTVE73Wk1 0IV9F7nIs3xtC9BJMG4rtneSpdAazDONWGQk1OlVLZ8J6qPdRRgNlj16f46RFUQqXdcA mLn9uhd5GQ1d7TS0/nKwqKhMBcWf3qoLwPPr3w0uYiLNo3J7CGo9Y5nv+LNIGbpd+niE FMAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LFpcUT0GZY3TnmZhvqCI5smkUAUhAFXHZgsitRceJwM=; b=sNcZ2lXuNTXyO3XytgeCnS4f7YaXm/Sy6Mgs8/B/8JmqiJcktgpQuG6lbwtkMgIn2J jaYNgR740Qmoeq5OfTsszvxY158B8B+e9O6hNThJIEQgFRQcLW/CavHJlC442QD8TBbU ihCQvo78lYhO9xUwWkL8z0a5AZ3kNiKPsO7RrO8TAr0aLAS1wWT23eCU+Ie2qXkE0KvX jC8L/6u5Z/cmzdoBejArC1h8oGqNYPCGFvjVGt89MrdtBlt/hAsKzUsW8cGhZw+i2SXr vC6gvmmN7/KIZ5T+Dq6//cNXqmo22XqzbdeoqQzQMhEAdQu0W7XBTh80tBzFKopo3MI5 bfdg== X-Gm-Message-State: AOAM531LBnwWhZxrlaacAHTajMm8K7ue7bIuUjFA/1xz4iJ7vC/2+mWQ ndtdUzsVbKBr7Pr2Xa7J4uB79A== X-Google-Smtp-Source: ABdhPJyZdIChp/7ap3172a23a+QvMIMS3hyZCSY8usna644jG27+KqLIyG5R8bAV0zE2GTZssNY1Dg== X-Received: by 2002:a92:c26c:: with SMTP id h12mr28232127ild.165.1607941509556; Mon, 14 Dec 2020 02:25:09 -0800 (PST) Received: from heartswap.lan.dana.is (173-17-84-59.client.mchsi.com. [173.17.84.59]) by smtp.gmail.com with ESMTPSA id h1sm11064030ilj.8.2020.12.14.02.25.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2020 02:25:09 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [RFC] Case-insensitive path completion in _git From: dana In-Reply-To: Date: Mon, 14 Dec 2020 04:25:08 -0600 Cc: Zsh hackers list Content-Transfer-Encoding: quoted-printable Message-Id: <48F77550-F5AF-424A-A474-9D379D69F5AD@dana.is> References: To: m0viefreak X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Seq: 47743 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: On 13 Dec 2020, at 07:55, m0viefreak = wrote: > This solution only handles simple upper-lower-case conversion = matcher-list styles, > but it will not work for more complicated styles like 'r:|[._-]=3D* = r:|=3D*'. > That's probably fine for most use-cases. That's true. On 13 Dec 2020, at 07:55, m0viefreak = wrote: > Performance-wise, it's obviously worse than than your proposed = solution, but > still better than the fallback, since it still passes $gitprefix to = ls-files, > which should also avoid the CWD problem. Are you sure? It seems to me that $gittoplevel$gitprefix is normally the = CWD, so you'd just be running `git ls-files /path/to/cwd/*`, which will never = match a PREFIX like `../foo`. I guess we could make it so that it retains any leading segments in = PREFIX, but then you have the same two issues again (those segments have to be = matched case-insensitively, and it doesn't account for more complex matcher-list styles). I also just realised that we can't match stuff like `./foo` or `.//foo` = or `../cwd/../`, since `git ls-files` elides unnecessary slashes/segments = in its output. On 13 Dec 2020, at 07:55, m0viefreak = wrote: > The trigger of the fallback is broken anyways, isn't it? ... > It just considers the case where no match was found at all, but it = does not > handle the case where *some* matches were found, but not all. As it is in the repo, yes, actually. If you have like foobar and Foobaz, = then foo will return only the former without triggering the fall-back. dana