Bug 1490049

Summary: Completion doesn't work for dnf on KDE spin
Product: [Fedora] Fedora Reporter: jeremy9856
Component: dnfAssignee: rpm-software-management
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: jmracek, mrunge, ooprala, packaging-team-maint, rpm-software-management, sheltren, ville.skytta, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-09 20:27:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jeremy9856 2017-09-09 16:53:19 UTC
Hello,

The completion doesn't work for dnf on KDE spin. I found that it's because the file /etc/bash_completion.d/dnf-completion.bash is missing.

Thanks !

Comment 1 jeremy9856 2017-09-09 17:23:02 UTC
Well I put this one http://pastebin.com/raw.php?i=6u4c8uab here /etc/bash_completion.d/dnf-completion.bash and dnf bash completion worked again.

I removed the file and reboot waiting for a proper fix and dnf bash completion is still working ! Why ?

Comment 2 jeremy9856 2017-09-09 19:37:49 UTC
> I found that it's because the file /etc/bash_completion.d/dnf-completion.bash
> is missing.

I found the info and the dnf-completion.bash there

https://ask.fedoraproject.org/en/question/69318/dnf-bash-completion/?answer=69324#post-id-69324

It's 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 copy it back the dnf completion work again.

Don't know why it didn't work 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.

Comment 3 Ville Skyttä 2017-09-09 20:27:41 UTC
It should work out of the box. Don't add anything to /etc/bash_completion.d for this, /usr/share/bash-completion/completions/dnf is shipped by the dnf package (not bash-completion!), and that's the correct file.

Reassigning to dnf because of the file ownership, and closing because it works after all.