Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug report; git tab-completion on macOS within paths containing unicode characters
- X-seq: zsh-workers 52898
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: pu.y@xxxxxxxxxx
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Bug report; git tab-completion on macOS within paths containing unicode characters
- Date: Sat, 27 Apr 2024 12:31:24 -0700
- Archived-at: <https://zsh.org/workers/52898>
- In-reply-to: <CAH+w=7aumcauhMZWLAnT6mXVD_DE2bEdARE6fwAPORLAqWgKvQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAB+zqbrx+EsPSb-zMusCUN4Vp4E6e6rg=RG0pLjh4RdBt2ZS0A@mail.gmail.com> <CAH+w=7aumcauhMZWLAnT6mXVD_DE2bEdARE6fwAPORLAqWgKvQ@mail.gmail.com>
On Sat, Apr 27, 2024 at 12:14 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> I'm uncertain that this is zsh's fault. "git ls-files" is returning
> that the directory is not a git repository, at least when I try to
> reproduce.
See if this helps -- I'm not sure this is the only (or even best)
place to apply a change, but I'm curious whether it improves your
results.
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7370aaead..47c386106 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -7526,7 +7526,7 @@ __git_files () {
# TODO: --directory should probably be added to $opts when --others is given.
local pref=${(Q)${~PREFIX}}
- [[ $pref[1] == '/' ]] || pref=$gittoplevel$gitprefix$pref
+ [[ $pref[1] == '/' ]] || pref=${(qqqq)gittoplevel}$gitprefix$pref
# First allow ls-files to pattern-match in case of remote repository. Use the
# icase pathspec magic word to ensure that we support case-insensitive path
Messages sorted by:
Reverse Date,
Date,
Thread,
Author