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
The pacman package already has bash completions in it:
$ 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?
not at all work like shell prompt completion, but just:
$ 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 ?
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?