diff options
author | Johnny Jazeix <jazeix@gmail.com> | 2020-04-13 16:26:28 (GMT) |
---|---|---|
committer | Johnny Jazeix <jazeix@gmail.com> | 2020-04-13 16:26:28 (GMT) |
commit | da99eca1e7956e42e88df1b52c322f9c571acddd (patch) | |
tree | a56a4154cfe09f318cbd3b235c22b0378f230d5d /Help/command | |
parent | fab932c3cba9423443c7ab25fda3999e4fc4b347 (diff) | |
download | CMake-da99eca1e7956e42e88df1b52c322f9c571acddd.zip CMake-da99eca1e7956e42e88df1b52c322f9c571acddd.tar.gz CMake-da99eca1e7956e42e88df1b52c322f9c571acddd.tar.bz2 |
list: add NATURAL sorting on SORT sub-command
Fixes: #20563
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/list.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Help/command/list.rst b/Help/command/list.rst index 50bf417..4d339a0 100644 --- a/Help/command/list.rst +++ b/Help/command/list.rst @@ -308,6 +308,13 @@ The ``<compare>`` option should be one of: * ``STRING``: Sorts a list of strings alphabetically. This is the default behavior if the ``COMPARE`` option is not given. * ``FILE_BASENAME``: Sorts a list of pathnames of files by their basenames. +* ``NATURAL``: Sorts a list of strings using natural order + (see ``strverscmp(3)`` manual), i.e. such that contiguous digits + are compared as whole numbers. + For example: the following list `10.0 1.1 2.1 8.0 2.0 3.1` + will be sorted as `1.1 2.0 2.1 3.1 8.0 10.0` if the ``NATURAL`` + comparison is selected where it will be sorted as + `1.1 10.0 2.0 2.1 3.1 8.0` with the ``STRING`` comparison. Use the ``CASE`` keyword to select a case sensitive or case insensitive sort mode. The ``<case>`` option should be one of: |