zsh-workers
 help / color / mirror / code / Atom feed
* Bug report; git tab-completion on macOS within paths containing unicode characters
@ 2024-04-26  7:17 Yves Delley
  2024-04-27 19:14 ` Bart Schaefer
  0 siblings, 1 reply; 12+ messages in thread
From: Yves Delley @ 2024-04-26  7:17 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1715 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1932 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-04-30  2:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26  7:17 Bug report; git tab-completion on macOS within paths containing unicode characters 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
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

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).