zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
31.58k stars 1.88k forks source link

Escaping symbol added after every word to a Folder name #774

Closed iaroslavnikitin closed 10 months ago

iaroslavnikitin commented 11 months ago

Describe the bug

Escaping symbol added after every word to a Folder name, e.g. when typing a command cd untitled folder it suggests and writes – cd untitled\ folder

To Reproduce

Steps to reproduce the behavior: installed simply zsh-autosuggestions and zsh-syntax-highlighting, started to use it and the issue appears right away

Expected behavior

when typing a command cd untitled folder it suggests and displays cd untitled folder

Screenshots

Screenshot 2023-12-28 at 10 58 29 PM

Desktop

saecki commented 10 months ago

I'm not a maintainer, but this is definitely intended. You can try out what happens if you don't add the backslash and run the cd command.

iaroslavnikitin commented 10 months ago

@Saecki, i do not add the backslash, it's added automatically by autosuggestion / autocompletion to every single folder that has more than 1 word in a title and a space between those words:

Screenshot 2024-01-08 at 7 20 23 PM
saecki commented 10 months ago

Yes, but the \ is necessary for your shell to understand that the two words are in fact one directory. If you would run cd untitled folder instead of cd untitled\ folder, you would get the following error:

❯ cd untitled folder
cd: string not in pwd: untitled
iaroslavnikitin commented 10 months ago

ah, got it, thank you, sorry for my noob's request here, closing the ticket then