Description of problem: The package installs bash completion information into /usr/share/bash-completion/completions/fzf. This location is incorrect for this specific case. That file does not contain completions for the fzf command per se (which would be what this directory is for), but enables completion for cases like vim **<TAB> which would open a fzf prompt to select files to add to the command line. As such, this file needs to be located in the /etc/bash_completion.d/ directory instead. Version-Release number of selected component (if applicable): fzf-0.19.0-1.fc31.x86_64 How reproducible: Always Steps to Reproduce: 1. install fzf 2. type "vim **<tab>" 3. Actual results: Nothing happens, or a single file name gets completed Expected results: A fzf prompt gets opened Additional info:
Hi thanks for the report, I've taken your advice and pushed an update to F30-F32.
fzf-0.20.0-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-604c23048f
fzf-0.20.0-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-30d859262f
fzf-0.20.0-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
fzf-0.20.0-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
What exactly describes what goes in which directory? Because this is the exact opposite of what bug 1683868 asked to do.
The way bash-completion loads things is a bit... convoluted. It definitely predates the "/etc is for local changes, /usr is for distribution stuff" that's kinda prevalent today. The basic call chain is /etc/profile.d/bash_completion.sh -> /usr/share/bash-completion/bash_completion -> /etc/bash_completion.d/* Everything in /etc/bash_completion.d always gets loaded. /usr/share/bash-completion/bash_completion _also_ sets up a dynamic handler that can load completions for specific programs when the user first tries autocomplete on them. Those get loaded from /usr/share/bash-completion/completions on demand. So if you want completion for program xfoo, a file can be put in /usr/share/bash-completion/completions/xfoo, and bash-completion will load it the first time you type "xfoo <tab>". This saves bash-completion from loading all possible completions in advance. The thing about fzf is that its autocompletion "<command> **<tab>" is not something that is tied to the fzf command itself, because it can autocomplete many programs for the specific ** pattern. For this to work, the completion logic needs to be always loaded, and needs to reside in /etc/bash_completion.d. To the best of my knowledge, while /etc/bash_completion.d is called "compat", there's no other directory for this purpose. If there is documentation about all this I don't know where it is.
Thanks for the explanation. I had noticed that some completions weren't work, but forgot/didn't have time to investigate.