[Aptitude-devel] Bug#814038: aptitude: Provide a way to reverse order with any of the available sorting criterias
Manuel A. Fernandez Montecelo
manuel.montezelo at gmail.com
Mon Feb 22 22:56:28 UTC 2016
Hi Axel,
2016-02-14 15:20 Axel Beckert:
>Control: severity -1 minor
>Control: retitle -1 aptitude: Document how to reverse the order of the available sorting criterias
>
>Hi,
>
>Manuel A. Fernandez Montecelo wrote:
>> >Currently [S], Aptitude::UI::Default-Sorting and --sort allow a bunch of
>> >sorting criterias, e.g. "installsize". "installsize" sorts the smallest
>> >packages first. Nevertheless there currently
>> >seems no way to sort packages so that the biggest packages come first.
>> >
>> >While e.g. "aptitude search --sort installsize '~i' | tac" is a
>> >workaround on the commandline, there's no similar workaround for
>> >anything affecting the TUI interface.
>>
>> I haven't checked so I don't know if it works 100%, and I don't know if
>> it's documented, but I think that prepending a ~ reverses the sort
>> policy direction, so "~installsize" should sort with the
>> largest-unpacked-size packages first.
>
>Thanks! That's what I was looking for!
>
>So it's solely a documentation issue. Raising severity from wishlist
>to minor then and retitling the bug report accordingly.
It's not documented in the man page, but then again in the --sort
section doesn't contain the policy names and it refers to the on-line
guide (which in my opinion is good, to not repeat information which can
easily go out of sync).
-O <order>, --sort <order>
Specify the order in which output from the search and versions
commands should be displayed. For instance, passing “installsize”
for <order> will list packages in order according to their size
when installed (see the section “Customizing how packages are
sorted” in the aptitude reference manual for more information).
The default sort order is name,version.
And in the User's Manual (using the on-line version URLs):
http://aptitude.alioth.debian.org/doc/en/ch02s05s01.html
Customizing how packages are sorted
By default, packages in the package list or in the output of aptitude
search are sorted by name. However, it is often useful to sort them
according to different criteria (for instance, package size), and
aptitude allows you to do just that by modifying the sorting policy.
Like the grouping policy described in the previous section, the
sorting policy is a comma-separated list. Each item in the list is the
name of a sorting rule; if packages are “equal” according to the first
rule, the second rule is used to sort them, and so on. Placing a tilde
character (~) in front of a rule reverses the usual meaning of that
rule. For instance, priority,~name will sort packages by priority, but
packages with the same priority will be placed in reverse order
according to name.
So it's already documented and I am satisfied with it as it is, although
I don't know if you would prefer to make it more prominent.
Cheers.
--
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
More information about the Aptitude-devel
mailing list