Tab completion for git add
fails on macOS if working directory path contains unicode characters in NFD (decomposed) form
#12380
Labels
Resolution: not our issue
Issue or pull request not related to Oh My Zsh
Describe the bug
I may have found an issue with auto-completion for git on macOS (
git
plugin enabled). I am not sure if this is the right place to report; let me know if not.If I attempt to tab-complete on
git add
within a repo whose path contains unicode characters in NFD (decomposed) form, no completions are presented. With unicode characters in NFC form, everything works as expected. It appears that the macOS Finder application writes folder names in NFD form, whereas on Terminal.app, you have to jump through some hoops to get there.Steps to reproduce
On
macOS
, with OMZ installed through homebrew and with thegit
plugin enabled, try the following:mkdir /tmp/test1 && cd /tmp/test1
git init
touch test.txt
git add t
, then press TAB and seetest.txt
being suggestedrmdir -r /tmp/test1
cd /tmp
mkdir $(echo 'u\xcc\x88')
. I did not find a better way to create a folder with a unicode character in NFD form. In particular, typing the corresponding keyü
on ade_CH
keyboard creates that character in NFC form.cd ü/
- here, it doesn't matter which form you use; after all, they are still the same unicode charactermkdir test2
cd test2
git init
touch test.txt
git add t
, then press TAB; nothing is being suggestedrmdir -r /tmp/ü/test2
Expected behavior
See above.
Screenshots and recordings
No response
OS / Linux distribution
macOS 14.4.1
Zsh version
5.9
Terminal emulator
Terminal.app
If using WSL on Windows, which version of WSL
None
Additional context
I doubt it matters, but here is the locale anyway:
The text was updated successfully, but these errors were encountered: