Add documentation about sort specification.

This commit is contained in:
Pierre Rust 2014-06-12 09:14:05 +02:00
parent 4958ce83c3
commit 3426363775
2 changed files with 25 additions and 2 deletions

View file

@ -169,8 +169,9 @@ list
Want to search for "Gronlandic Edit" by of Montreal? Try ``beet list
gronlandic``. Maybe you want to see everything released in 2009 with
"vegetables" in the title? Try ``beet list year:2009 title:vegetables``. (Read
more in :doc:`query`.)
"vegetables" in the title? Try ``beet list year:2009 title:vegetables``. You
can also specify the order used when outputting the results (Read more in
:doc:`query`.)
You can use the ``-a`` switch to search for albums instead of individual items.
In this case, the queries you use are restricted to album-level fields: for

View file

@ -183,3 +183,25 @@ equivalent::
Note that this only matches items that are *already in your library*, so a path
query won't necessarily find *all* the audio files in a directory---just the
ones you've already added to your beets library.
Sort Order
----------
You can also specify the order used when outputting the results. Of course, this
is only useful when displaying the result, for example with the ``list``
command, and is useless when the query is used as a filter for an command. Use
the name of the `field` you want to sort on, followed by a ``+`` or ``-`` sign
if you want ascending or descending sort. For example this command::
$ beet list -a year+
will list all albums in chronological order.
You can also specify several sort orders, which will be used in the same order at
which they appear in your query::
$ beet list -a genre+ year+
This command will sort all albums by genre and, in each genre, in chronological
order.