Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilde+tab triggers backslash #1277

Closed
LangLangBart opened this issue Aug 27, 2022 · 5 comments · Fixed by carapace-sh/carapace#550 or #1278
Closed

Tilde+tab triggers backslash #1277

LangLangBart opened this issue Aug 27, 2022 · 5 comments · Fixed by carapace-sh/carapace#550 or #1278
Labels
bug Something isn't working zsh

Comments

@LangLangBart
Copy link

description

Pressing the tab key after the ~ (tilde) symbol adds a \ (backslash) in front of the tilde symbol

  • macOS
    • default terminal
  • zsh setup
    • romkatv/zsh4humans

to reproduce

  1. Type mv ~/
  2. Press the tab key
  3. a backslash appears before the tilde symbol
  4. see GIF below for more clarity

GIF

issue

PS: Found out about this repo from a post in the cli/cli repo. Besides the ~ (tilde) issue very happy with it.

@rsteube rsteube added bug Something isn't working zsh labels Aug 27, 2022
@rsteube
Copy link
Member

rsteube commented Aug 27, 2022

Yes, this is done by compadd which currently handles quoting (carapace-sh/carapace#313) and related to how zsh does file expansion.
I think there was a zsh config that expands the path before passing it to a command which would be a quick fix, can't find it at the moment though.

This is actually a bit tricky (as there can also be files/folders/arguments with a ~ prefix) and I've been avoiding the issue so far to first get a better understanding of how to handle it.
I have general idea now though and will have a look at it.

@LangLangBart
Copy link
Author

❯ carapace --version
0.15.0

I can confirm that the \ (backslash) no longer appears, but it adds a space after the selected word.
them

@rsteube
Copy link
Member

rsteube commented Aug 28, 2022

Hmm..this is somehow related to the fzf plugin 🤔 . It works with the standard zsh menu.

@rsteube
Copy link
Member

rsteube commented Aug 28, 2022

Either related to a fzf-tab or zsh4humans configuration. Issue doesn't seem to appear using fzf-tab directly.

@rsteube
Copy link
Member

rsteube commented Aug 28, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working zsh
Projects
None yet
2 participants