From: Bart Schaefer <schaefer@brasslantern.com>
To: pu.y@delley.net
Cc: zsh-workers@zsh.org
Subject: Re: Bug report; git tab-completion on macOS within paths containing unicode characters
Date: Sun, 28 Apr 2024 11:59:20 -0700 [thread overview]
Message-ID: <CAH+w=7ZXGRuC_hvpMDgZJa+apfY008U8sbHYkwZWUaHA=0GsKw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7ZSmQZ6dJrN4u9DoPDPZvfGMiYBEp42FVzVhZgWYbchoA@mail.gmail.com>
This used to work in 5.7.1 (default shell on Catalina). Then this
change was made:
- local pref=$gitcdup$gitprefix$PREFIX
+ local pref=${(Q)${~PREFIX}}
+ [[ $pref[1] == '/' ]] || pref=$gittoplevel$gitprefix$pref
Unquoting the prefix with (Q) seems to have broken it. That came from
workers/45313 ("revised version of workers/41523"). Daniel?
A different fix to try:
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
next prev parent reply other threads:[~2024-04-28 18:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 7:17 Yves Delley
2024-04-27 19:14 ` Bart Schaefer
2024-04-27 19:31 ` Bart Schaefer
2024-04-28 7:22 ` Yves Delley
2024-04-28 15:28 ` Bart Schaefer
2024-04-28 18:59 ` Bart Schaefer [this message]
2024-04-28 19:01 ` Bart Schaefer
2024-04-29 17:37 ` Jun. T
2024-04-29 17:54 ` Bart Schaefer
2024-04-30 0:41 ` Jun. T
2024-04-30 1:57 ` Bart Schaefer
2024-04-30 2:31 ` Jun. T
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7ZXGRuC_hvpMDgZJa+apfY008U8sbHYkwZWUaHA=0GsKw@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=pu.y@delley.net \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).