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. https://ask.fedoraproject.org/en/question/69318/dnf-bash-completion/?answer=69324#post-id-69324 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 dnf-2.6.3-11.fc27.noarch dnf-conf-2.6.3-11.fc27.noarch dnf-plugins-core-2.1.3-2.fc27.noarch dnf-yum-2.6.3-11.fc27.noarch libdnf-0.9.3-7.fc27.x86_64 python2-dnf-2.6.3-11.fc27.noarch python3-dnf-2.6.3-11.fc27.noarch python3-dnf-plugins-core-2.1.3-2.fc27.noarch libsolv-0.6.29-1.fc27.x86_64 libdnf-0.9.3-7.fc27.x86_64
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 ***
The issue is solved by dnf-3.0.1-1 that was released into rawhide.