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 52904
- 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: Sun, 28 Apr 2024 12:01:15 -0700
- Archived-at: <https://zsh.org/workers/52904>
- In-reply-to: <CAH+w=7ZXGRuC_hvpMDgZJa+apfY008U8sbHYkwZWUaHA=0GsKw@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> <CAH+w=7aHgOJd=tAwfr7_FziNxeQC9dn_coioT0ndFBJhf68V3g@mail.gmail.com> <CAB+zqbqmturuSzuOPuHs91beERmu5XHp_Jm0E5mA2PBfib0b_g@mail.gmail.com> <CAH+w=7ZSmQZ6dJrN4u9DoPDPZvfGMiYBEp42FVzVhZgWYbchoA@mail.gmail.com> <CAH+w=7ZXGRuC_hvpMDgZJa+apfY008U8sbHYkwZWUaHA=0GsKw@mail.gmail.com>
Ugh, line wrapping.
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7370aaead..22b945e38 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -7531,7 +7531,7 @@ __git_files () {
# 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
# completion for users with the appropriate matcher configuration
- files=(${(0)"$(_call_program files git ls-files -z --exclude-standard ${(q)opts} -- ${(q)${pref:+:\(icase\)$pref\*}:-.} 2>/dev/null)"})
+ files=(${(0)"$(_call_program files git ls-files -z --exclude-standard ${(q)opts} -- ${(q)${pref:+:\(icase\)${(qq)pref}\*}:-.} 2>/dev/null)"})
__git_command_successful $pipestatus || return
# If ls-files succeeded but returned nothing, try again with no pattern. Note
Messages sorted by:
Reverse Date,
Date,
Thread,
Author