Hi,
I may have found an issue with tab-completion for git on macOS (using oh-my-zsh; but they indicate that git tab-completion is an upstream issue; see
https://github.com/ohmyzsh/ohmyzsh/issues/12380).
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 14.4, with OMZ installed through homebrew and with the `git` plugin enabled, try the following:
- Verify that command completion works normally:
- `mkdir /tmp/test1 && cd /tmp/test1`
- `git init`
- `touch test.txt`
- Type `git add t`, then press TAB and see `test.txt` being suggested
- Optional: `rmdir -r /tmp/test1`
- Repeat with a unicode path in NFD form
- `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 using the Terminal. In particular, typing the corresponding key `ü` on a `de_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 character
- `mkdir test2`
- `cd test2`
- `git init`
- `touch test.txt`
- Type `git add t`, then press TAB; nothing is being suggested
- Optional: `rmdir -r /tmp/ü/test2`
Software versions:
- macOS 14.4.1
- zsh 5.9
Locale:
LC_ALL=de_CH.UTF-8
LANG=en_GB.UTF-8
LC_CTYPE=UTF-8
Thank you,
Yves