[Bug 280196] sh autocomplete deletes characters in ru_RU.UTF-8
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 280196] sh autocomplete"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 Jan 2026 11:16:30 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280196
Alexey Sukhoguzov <aps@aps94.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aps@aps94.com
--- Comment #5 from Alexey Sukhoguzov <aps@aps94.com> ---
(In reply to serg from comment #0)
> mkdir "Архив (один)"
> mkdir "Архив (два)"
> rmdir А<cursor><TAB>
> rmdir <cursor>
That's probably because completion_matches() from
contrib/libedit/filecomplete.c determines a common prefix between
all found matches byte-by-byte (lines 497-506), without considering
multibyte encodings. This leads to something like "Архив (\xd0"
being the common prefix (because both cyrillic 'о' and 'д' starts
with d0), which of course doesn't work later on when fn_complete2
tries to convert it to wchar in an attempt to replace the completed
string (lines 737-742).
By the way, looks like sh_matches() from bin/sh/histedit.c has the
same issue, but this function is only used for $PATH completion,
so it shouldn't be that annoying in everyday use.
--
You are receiving this mail because:
You are the assignee for the bug.