zsh-workers
 help / color / mirror / code / Atom feed
From: Yves Delley <pu.y@delley.net>
To: zsh-workers@zsh.org
Subject: Bug report; git tab-completion on macOS within paths containing unicode characters
Date: Fri, 26 Apr 2024 09:17:00 +0200	[thread overview]
Message-ID: <CAB+zqbrx+EsPSb-zMusCUN4Vp4E6e6rg=RG0pLjh4RdBt2ZS0A@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2024-04-26  7:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  7:17 Yves Delley [this message]
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

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='CAB+zqbrx+EsPSb-zMusCUN4Vp4E6e6rg=RG0pLjh4RdBt2ZS0A@mail.gmail.com' \
    --to=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).