list: Add options to control the SORT comparison operation

This commit is contained in:
Daniel Franke
2018-05-11 17:36:49 +02:00
committed by Brad King
parent f31d4ac7d6
commit 49a51a61d7
30 changed files with 391 additions and 11 deletions
+19 -3
View File
@@ -28,7 +28,7 @@ Synopsis
`Ordering`_
list(`REVERSE`_ <list>)
list(`SORT`_ <list>)
list(`SORT`_ <list> [...])
Introduction
^^^^^^^^^^^^
@@ -253,7 +253,23 @@ Reverses the contents of the list in-place.
::
list(SORT <list>)
list(SORT <list> [COMPARE <compare>] [CASE <case>] [ORDER <order>])
Sorts the list in-place alphabetically.
Use the option ``<compare>`` to select the compare type for sorting.
The ``<compare>`` option may be one of:
* ``STRING``: Sorts a list of strings alphabetically.
* ``FILE_BASENAME``: Sort a list of pathnames of files by their basenames.
Use the option ``<case>`` to select a case sensitive or case insensitive sort mode.
The ``<case>`` option may be one of:
* ``SENSITIVE``: Sorts the list alphabetically.
* ``INSENSITIVE``: Sorts the list alphabetically in descending order.
Use the option ``<order>`` to select a case sensitive or case insensitive sort mode.
The ``<order>`` option may be one of:
* ``ASCENDING``: Sorts the list in ascending order.
* ``DESCENDING``: Sorts the list in descending order.