Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [RFC] Case-insensitive path completion in _git
- X-seq: zsh-workers 48270
- From: Lawrence Velázquez <vq@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: dana <dana@xxxxxxx>
- Subject: Re: [RFC] Case-insensitive path completion in _git
- Date: Sat, 27 Mar 2021 16:06:00 -0400
- Archived-at: <https://zsh.org/workers/48270>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-03/42295452-2ad5-4236-ad37-43cd4fa9a716%40www.fastmail.com>
- In-reply-to: <B25A8850-A141-4B81-A3E6-017F280B0CC6@dana.is>
- List-id: <zsh-workers.zsh.org>
- References: <B25A8850-A141-4B81-A3E6-017F280B0CC6@dana.is>
On Sat, Dec 12, 2020, at 11:40 PM, dana wrote:
> I've had this sitting for a while:
>
> _git has issues completing files case-insensitively (if you have matcher-list
> 'm:{a-zA-Z}={A-Za-z}' or whatever). Looking into it, i found that __git_files
> is trying to pass a glob pattern to `git ls-files`, and this fails if there's
> not an exact case match, since ls-files is always case-sensitive.
>
> There is a fall-back to `git ls-files` with no path, but this doesn't always
> work either, because it defaults to the CWD, and the file you're trying to
> complete may not be under the CWD. Even when the fall-back succeeds, it's not
> ideal, because it'll pass every single file in the tree to _multi_parts, which
> can be slow.
>
> The following hack solves the problem for me, but it might be too silly to
> commit. Can anyone think of a more proper fix? If not, would the hack be
> viable (probably gated behind a style)?
Any further feedback (assuming dana still feels like pushing this, of course)?
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author