Skip to content

fish prepends back slash when using tilde while autocompleting an escape character #9073

@xEgoist

Description

@xEgoist

Environment

  • fish --version
    fish, version 3.5.0

  • uname -a
    Darwin Egoist 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64

  • $TERM
    xterm-256color
    Also happens with Alacritty, Kitty, Terminal.app

  • Issue also affects fish without third party customization

Issue

I believe this is similar, yet an edge case of #4570 .

the backslash bug only occurs when autocompleting something that require escaping without the user escaping it themselves.

to reproduce, run the following commands:

mkdir ~/fish_bug
cd ~/fish_bug
touch '[Hello]World.txt'
vim ~/fish_bug/[ **Tab**           <--- Notice that I deliberately did not escape the bracket.

result: vim \~/fish_bug/[Hello]\ World.txt

expected result: vim ~/fish_bug/[Hello]\ World.txt

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