junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
63.66k stars 2.37k forks source link

[Fedora/DNF] Can't have kill and `**` completion working #1690

Open GabVenturato opened 4 years ago

GabVenturato commented 4 years ago

Hi, I've just installed fzf on Fedora 30 with oh-my-zsh (updated to last version). After installing fzf it was not working, so I've find out that I had to add the plugin fzf to the list of active plugins in my .zshrc. After doing this I ended up with key-bindings working, but I am not able to use kill autocompletion, nor ** expansion, because when I use that I have ah expansion from (I presume) zsh.

I tried to use the export FZF_COMPLETION_TRIGGER='~~' in my .zshrc, but even after a restart of the shell I didn't manage to have it working.

I've also seen that on arch wiki there is the suggestion to source the file /usr/share/fzf/completion.zsh, but (maybe because I have fedora and not arch) I don't have that file. Moreover, i have a key-binding.zsh file but in /usr/share/fzf/shell/ path.

Any idea? Am I doing something wrong? Or have I missed some step maybe? Thanks.

junegunn commented 4 years ago

I've just installed fzf on Fedora 30

How did you install fzf? By cloning it or using DNF?

If it's latter, Have you tried reading the package documentation as suggested in https://github.com/junegunn/fzf#fedora?

GabVenturato commented 4 years ago

Yeah sorry, I forgot to specify that: I've used DNF.

If it's latter, Have you tried reading the package documentation as suggested in https://github.com/junegunn/fzf#fedora?

Of course, but this is the content I have on that documentation file:

fzf provides several niceties, such as shell completion, shell key bindings,
and a vim plugin. In Fedora, we only enable the shell completion and install
the plugin for vim and neovim by default as they are generally non-intrusive.
The key bindings are installed but not enabled.

To enable shell key bindings, source the applicable script from
/usr/share/fzf/shell from your shell initialization. For example, use
/usr/share/fzf/shell/key-bindings.bash in ~/.bashrc for user-wide bash.

and the point is that my key bindings is working well, the problem is on shell completion. So I hadn't sourced any script in .zshrc, because the only script I have at /usr/share/fzf/shell is the one for key-bindings. And seeing what is written in the doc file, the completion should work.. am I wrong?

junegunn commented 4 years ago

Maybe completion.bash is not included in the package? You might want to contact the package maintainer. Meanwhile, everything should work fine if you install fzf using git.

GabVenturato commented 4 years ago

Hi, thank you for support. I've just tested your suggestion: I've copied the completion script file (downloaded from github repository), inside the directory in which there already is the key-binding scripts. After only copying everything start working properly. So, it seems you're right! The problem is due to Fedora package maintainer.

Moreover, I've find out an already opened bug for this package in bugzilla, I've added some information, but if anyone have the same issue could add more information or simply telling it in order to give it more resonance.

Thank you again.

xieshiyao commented 4 years ago

Similar issue on fedora30 with bash. Installing it using git fixed it.