Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Pacman Completion for better user experience (Read 713 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Pacman Completion for better user experience

How can we have Pacman Completion ?
one that has ability to complete package name when on CLI at pacman argument by hitting tab or other preset key

Re: Pacman Completion for better user experience

Reply #1
The pacman package already has bash completions in it:
Code: [Select]
$ pacman -Ql pacman
....
pacman /usr/share/bash-completion/
pacman /usr/share/bash-completion/completions/
pacman /usr/share/bash-completion/completions/makepkg
pacman /usr/share/bash-completion/completions/pacman
pacman /usr/share/bash-completion/completions/pacman-key
....

There is usually a pause with pacman completions when you hit tab, while it searches for the package names. You might try installing the bash-completion package as well if it isn't working, perhaps that would help? It works here but I have bash-completion installed too for improved general usage completions. Or perhaps you need to run pacman -Sy on a fresh install to populate the databases?

Re: Pacman Completion for better user experience

Reply #2
not at all work like shell prompt completion, but just:

Code: [Select]
$ sudo pacman -Ql pa
pacman                      pam                         parted
pacman-contrib              pambase                     patch
pacman-hook-kernel-install  pango                       pavucontrol

How to configure up to hava as good ability as  shell prompt one ?

Re: Pacman Completion for better user experience

Reply #3
But what more can it do given only "pa" as the start of the next word, except give you a list of options? If you made it "par" then hit tab it would complete on "parted" but it can't guess from the 2 letters you have typed so far which one you want. What exactly would you like it to do here instead?