fzf-tab
fzf-tab copied to clipboard
[Q] [carapace + fzf-tab] adds an extra backslash to file completion.
When using carapace in conjunction with fzf-tab, it inadvertently adds an extra backslash to escape spaces or parentheses.
: mv Hello\\ One\\ \\(Two\\)\\ \\[Three\\].mp3 test.mp3
zsh: no matches found: \(Two\)\
However, when using ** and pressing tab, the command is executed successfully.
mv Hello\ One\ \(Two\)\ \[Three\].mp3
Is there a way to resolve this issue either by updating the fzf configuration or the carapace configuration?
As per the developer of Carapace
Carapace does custom quoting with compadd -Q. Fzf-tab probably does that as well (or adds them without -Q) without acknowledging they are already quoted.
Confirmed.
_tst() {
local -a displaysArr=('Hello One (Two) [Three].mp3')
local -a valuesArr=('Hello\\ One\\ \\(Two\\)\\ \\[Three\\].mp3')
_describe -t files files displaysArr valuesArr -Q -S ''
}
compdef _tst tst