rockandska / fzf-obc

fzf over bash complete
50 stars 6 forks source link

leading backslash #27

Closed dicktyr closed 4 years ago

dicktyr commented 4 years ago

I noticed this as I sometimes use backslash to override aliases

$ \cd <tab>
$ \cd ^[\[01\;34m/usr/^[\[0m

note that mv \x <tab> works as expected so it seems the issue is when backslash is the first non-blank character

rockandska commented 4 years ago

Thanks for your feedback. I'm able to reproduce it too and will take a look soon.

NB: it seems that the complete function used when adding \ to bypass the alias do not use the original completion script. So it could lead to unexpected results as see files when doing \cd If you test in a clean environment (without fzfz-obc) you'll see:

complete -F _minimal \cd
complete -o nospace -F _cd cd
rockandska commented 4 years ago

Please, test with branch fix/#27 to let me know if it solved your problem before merging it. Thanks

dicktyr commented 4 years ago

thanks works for me