Jguer / yay

Yet another Yogurt - An AUR Helper written in Go
GNU General Public License v3.0
11.26k stars 365 forks source link

Allow sorting AUR results by Fields other than Votes #326

Closed DL6AKU closed 6 years ago

DL6AKU commented 6 years ago

Affected Version

v5.608.r30.g794e8dd

Issue

When searching with yay foo, the results from the AUR are not sorted alphabetically. Results from the repos are sorted alphabetically.

Here an example for yay archiver:

$ yay archiver
37 aur/ddar-git r112.8ce4727-1 (+0 0.00%) 
    Free de-duplicating archiver for Unix (git)
36 aur/ha-archiver 0.999beta-1 (+0 0.00%) 
    HA is an archiver which Harri Hirvola released in January 1993 as version 0.98.
35 aur/libkar-git r37.0777a50-1 (+0 0.00%) 
    an extremely simple Qt based keyed archiver for usage by the KISS IDE suite of applications
34 aur/archmbox 4.10.0-0 (+0 0.00%) 
    A simple email archiver written in perl
33 aur/dosage-git 1412-1 (+1 0.00%) 
    A comic downloader and archiver.
32 aur/dosage 2.15-1 (+1 0.00%) 
    A comic downloader and archiver.
31 aur/b1freearchiver 1.5.86.4849-2 (+1 0.00%) (Out-of-date 2016/12/12) 
    Most friendly and simple free file archiver
30 aur/archiver 2.0-0 (+2 0.02%) 
    Easily create and extract .zip, .tar, .tar.gz, .tar.bz2, .tar.xz, and .rar (extract-only) files with Go
29 aur/peazip-gtk2-build 6.5.1-1 (+2 0.03%) 
    Free GTK2 cross-platform file archiver (compiles from source)
28 aur/qt5-fsarchiver 0.8.1_1-2 (+3 0.04%) 
    GUI for fsarchiver
27 aur/kde-servicemenus-unarchiver 1,0-1 (+3 0.00%) 
    Use unar from Unarchiver to extract archive files.
26 aur/kde-servicemenus-peazip 20170202-1 (+3 0.00%) 
    PeaZip archiver services, fixed for Dolphin KF5
25 aur/peazip-gtk2-portable 6.5.1-1 (+4 0.00%) 
    Natively compiled 64-bit GTK2 archiver utility, portable version with no dependencies
24 aur/star 1.5.3-1 (+5 0.00%) 
    A fast POSIX-compliant tape archiver
23 aur/peazip-qt-opensuse-latest 6.5.0-1 (+6 0.00%) (Orphaned) 
    QT archiver utility (openSUSE RPM)
22 aur/peazip-qt-build 6.5.1-1 (+6 0.01%) 
    Free cross-platform file archiver (compiles from source)
21 aur/amanda 3.5.1-1 (+10 0.22%) 
    Advanced Maryland Automatic Network Disk Archiver network backup for Linux Windows clients, supports SSH, AES, GPG, encryption, tape, RAIT, mirror, changers, Amazon S3, ipv6, DVD, NDMP, VTL, advanced scripting
20 aur/xarchiver-assume-name 0.5.4-2 (+11 0.00%) 
    Xarchiver with the ability to archive directories without a name change
19 aur/p7zip-natspec 16.02-1 (+12 0.22%) 
    Command-line file archiver with high compression ratio, based on libnatspec patch from ubuntu zip-i18n PPA (https://launchpad.net/~frol/+archive/zip-i18n).
18 aur/arc 5.21p-3 (+14 2.13%) 
    Arc file archiver and compressor. Long since superceeded by zip/unzip but useful if have old .arc files need to unpack.
17 aur/peazip-qt 6.5.1-1 (+14 0.02%) 
    QT archiver utility
16 aur/qt4-fsarchiver 0.8.0_5-1 (+17 0.00%) 
    GUI for fsarchiver
15 aur/afio 2.5.1-4 (+21 0.06%) 
    Archiver & backup program with builtin compression
14 aur/paq8o 9-1 (+26 0.14%) 
    PAQ8 series of archivers, resurrected by new maintainers
13 aur/peazip-gtk2 6.5.1-1 (+34 0.13%) 
    GTK2 archiver utility
12 aur/p7zip-gui 16.02-4 (+41 1.38%) 
    Graphic user interface (alpha quality) for the 7zip file archiver
11 community/xarchiver-gtk2 0.5.4.13-1 (476.8 KiB 1.8 MiB) 
    GTK+ frontend to various command line archivers (GTK+ 2 version)
10 community/xarchiver 0.5.4.13-1 (476.6 KiB 1.8 MiB) 
    GTK+ frontend to various command line archivers
9 community/unarj 2.63a-4 (10.8 KiB 45.0 KiB) 
    An utility to extract, test and view the contents of archives created with the ARJ archiver
8 community/unarchiver 1.10.1-3 (1009.5 KiB 4.3 MiB) 
    unar and lsar: Objective-C tools for uncompressing archive files
7 community/qpress 1.1-2 (25.4 KiB 73.0 KiB) 
    File archiver using QuickLZ and designed to utilize fast storage systems to their max
6 community/nemo-fileroller 3.6.0-2 (5.4 KiB 34.0 KiB) 
    File archiver extension for Nemo
5 community/arj 3.10.22-11 (102.0 KiB 290.0 KiB) 
    Free and portable clone of the ARJ archiver
4 extra/zip 3.0-7 (136.4 KiB 498.0 KiB) (Installed)
    Compressor/archiver for creating and modifying zipfiles
3 extra/p7zip 16.02-4 (1.0 MiB 4.9 MiB) (Installed)
    Command-line file archiver with high compression ratio
2 extra/fsarchiver 0.8.4-1 (88.2 KiB 267.0 KiB) 
    Safe and flexible file-system backup and deployment tool
1 extra/fastjar 0.98-4 (27.0 KiB 91.0 KiB) 
    Sun java jar compatible archiver
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 
DL6AKU commented 6 years ago

I just noticed... is it sorted by popularity?

If so, please add an option to sort AUR results alphabetically like the rest.

Morganamilo commented 6 years ago

Yes It's sorted by popularity right now, I'll throw the ability to set sortby onto the TODO.

DL6AKU commented 6 years ago

Thanks!!

agguser commented 2 years ago

How to reverse the sort order? Currently, --sortby=name sorts from z to a; how to sort from a to z?

Jguer commented 2 years ago

@agguser --topdown may be what you're searching for?

agguser commented 2 years ago

Thanks! --topdown fixes the problem, even though the manual just says "Display repository packages first and then AUR packages.".