Skip to content

2-width characters (CJK languages) break command suggestion and completion #5729

@goranmoomin

Description

@goranmoomin
$ fish --version
fish, version 3.0.2

$ echo $version
3.0.2

Fish shell doesn't calculate CJK characters as two characters, which makes CJK characters mangle the shell output(for example, autosuggestions make characters erase the prompt, completions are not correctly displayed... etc).

As (almost) all CJK mono fonts display them as two characters, fish shell should calculate the locations with the assumption that CJK characters have a width of 2.

Below is an asciinema record of what's happening. (It should be viewed in macOS, as Windows or Linux cannot display HFS style NFD filenames properly.)

asciicast

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions