Red Hat Bugzilla – Bug 1479330
DNF 2.0: bash-completion not working by default, until sqlite is installed
Last modified: 2018-01-03 10:08:59 EST
even if /usr/share/bash-completion/completions/dnf is present, DNF version 2.0 lost auto-completion in my system - probably due to new version breakage?
It's a very useful feature when removing, but also installing packages!
What means that it doesn't work?
Is it a duplicate bug 1490049 ?
So it seem that bug 1490049 is a duplicate. Here is what happened :
The completion doesn't work ootb for dnf on KDE spin (work ootb on official Fedora). I found that it can be because the file /etc/bash_completion.d/dnf-completion.bash is missing.
Well after I added that file and rebooted dnf bash completion worked again !
I removed the file and rebooted waiting for a proper fix and dnf bash completion is still working !
The dnf-completion.bash is an old version of the file /usr/share/bash-completion/completions/dnf that is installed by dnf.
Now if I remove this file (/usr/share/bash-completion/completions/dnf) the dnf bash completion doesn't work and if I put it back the dnf completion work again.
Don't know why it didn't work ootb and work now. Creating a /etc/bash_completion.d/dnf-completion.bash file that contain the same content as /usr/share/bash-completion/completions/dnf somewhat triggered the dnf completion.
I thought it was working ootb on official Fedora but no. That said after I finished to install and tweak it the dnf completion was working !
Installing the sqlite package fixed it for me. Why that package isn't part of a default install of f26 I don't know.
Well that worked, thanks ! What surprise me it's on a previous install of Fedora 26, installing sqlite didn't made bash completion work.
I installed Fedora 27 on my laptop which was running find Fedora 26 along with bash completion. Since then bash completion has stopped working. I tried to find what else I have missing but could not find. I think I have all the needed files/packages and bash completion for commands like "dnf install TAB TAB" should work but it is not working.
So question is has something got broken recently? I have these packages
$ rpm -qa | grep dnf |sort
Looks like after installing sqlite package bash completion start to work.
I can confirm this. dnf completion on package names (dnf install ht<TAB>) is not working, until "sqlite" package gets installed. Please fix.
*** This bug has been marked as a duplicate of bug 1469667 ***