Bash completion under OMA Rock

Hi! I am using Open Mandriva Rock 6.0.

Result of inxi:

CPU: 6-core AMD Ryzen 5 5600 (-MT MCP-) speed/min/max: 3593/550/4470 MHz
Kernel: 6.14.2-desktop-3omv2590 x86_64 Up: 1h 10m Mem: 10.45/31.3 GiB (33.4%)
Storage: 391.15 GiB (16.4% used) Procs: 387 Shell: Bash inxi: 3.3.37

I am used to using bash-completion to use the Tab key to autocomplete the packages which I want to download. Under OMA Rock 6, however, I cannot seem to get it to work the same way. This is how my .bashrc looks like:

I have sourced the ~/.bashrc file. Am I doing something wrong? I would appreciate any input on this matter.

Thank you,

Fox

In the future, use the template.

With dnf or flatpak?

The completions are located in:

/usr/share/bash-completion/completions

Hi, I was looking into this too.

The issue is probably caused by a mismatch between the command name and the completion script name. The dnf completion script is named dnf-3 and while using the command dnf-3 the completions work just fine.

I solved by creating a symlink to the completion file and renaming it to reflect the command name

mkdir -p ~/.local/share/bash-completion/completions

Create the symbolic link to the target

ln -s /usr/share/bash-completion/completions/dnf-3 ~/.local/share/bash-completion/completions/dnf

I apologize. I’ll use the template in the future. And it is with the dnf.

@dev0null I had not realized that I need to do sudo dnf-3 install instead of dnf.

Your solution works perfectly for using just dnf rather than dnf-3.

Thank you both @zeroability and @dev0null for the replies.

1 Like

It may change again with dnf5 since that will be the new default. Did your .bashrc come from another distro? Try backing that up and copying the system one to your profile and see if the completions work. No one should be bringing over unneeded dotfiles from other distros (or entire ~ folders without knowing how to modify permissions).

I have just reinstalled the system, and updated it using dist-upgrade. I had a clean system on the other install, since I don’t like bringing in files from older systems. If I type dnf and use Tab it won’t auto-complete. If I use dnf-3, it will auto complete and list packages.

I assume the system original one is equal to the one right after installation, but I also tried to compare with diff between the one in my home folder and the one in /etc/skel/. It returns nothing. This is true for .bashrc, .bash_completion and .bash_profile files.

As far as I know, they should be.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.