Goodbye Yaourt https://archlinux.fr/yaourt-en finally arch people killed it.
pacopts uses cower to search download and install packages from AUR, but the exact format of pacopts commands and options are not very well documented and it is very peculiar in what it does as root and what it doesn't do as root, as 2 mutually exclusive groups of functions. Personally I don't understand why you can not run search as root. In any case, I think for the particular purpose the documentation of cower should have been merged into it.
So, what is package-query ?
Package query is the part of yaourt that gives it its search functionality fame. Yay, which I dislike, I found it had a nice default feature, it ordered AUR search hits by popularity, leaving untried less scrutinized packages with less visibility. So how does package query produce the same or similar output with yay while also listing instaled packages separately and also show the size of installed packages and with color?
But it is a long command to memorize and use for every time you search, so you can create a shortcut in your shell ....rc to abbreviate the syntax. Since I hate yay and wouldn't install the crap, I call my shortcut yay and this is my shortcut/alias in .zshrc
pacopts uses cower to search download and install packages from AUR, but the exact format of pacopts commands and options are not very well documented and it is very peculiar in what it does as root and what it doesn't do as root, as 2 mutually exclusive groups of functions. Personally I don't understand why you can not run search as root. In any case, I think for the particular purpose the documentation of cower should have been merged into it.
pacopts -z aur -s package-query
Since Arch-people seem to have condemned yaourt (the old favorite, tool of choice for AUR, WAS still available through archlinux.fr https://archlinux.fr/yaourt-en in the fall of 2020 but no more - I am glad I cloned the source) yaourt has remained famous for its search functionality. yaourt package query
gave you much more functionality than pacopts or cower. So, what is package-query ?
Package query is the part of yaourt that gives it its search functionality fame. Yay, which I dislike, I found it had a nice default feature, it ordered AUR search hits by popularity, leaving untried less scrutinized packages with less visibility. So how does package query produce the same or similar output with yay while also listing instaled packages separately and also show the size of installed packages and with color?
package-query -AQSs --rsort w --show-size package-query
local/package-query 1.11-1 [0.07 M]
Query ALPM and AUR
aur/package-query-git 1.10.r0.gab3f6a1-1 (149) (0.72)
Query ALPM and AUR
aur/package-query 1.11-1 [installed] (1162) (3.08)
Query ALPM and AUR
The -rsort option can be modified by votes or by number of downloads reflecting popularity in two ways.But it is a long command to memorize and use for every time you search, so you can create a shortcut in your shell ....rc to abbreviate the syntax. Since I hate yay and wouldn't install the crap, I call my shortcut yay and this is my shortcut/alias in .zshrc
alias yay='f(){package-query -AQSs --rsort w --show-size $@ ;unset -f f;};f'
yay package query
gives me the same output as abovecower -d package-query
cd package-query
makepkg
sudo pacman -U package-query*.xz
then create the above alias/shortcut for the search and you can search AUR I believe in a more effective way than cower or pacopts.