Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add '--sort-ascending', '--sort-descending' parameters
Allow users to reverse sorting direction. Change-Id: Iecd539139c5a7ce4abaaee2ff5632a2459437d51 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
- Loading branch information
1 parent
c1c9910
commit 7798cb2
Showing
3 changed files
with
82 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
releasenotes/notes/add-Lister-sort-direction-5f34dba3c9743572.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
features: | ||
- | | ||
The ``cliff.lister.Lister`` base class now implements ``--sort-ascending`` | ||
and ``--sort-descending`` options, which can be used to configure the sort | ||
direction. For example:: | ||
$ hello-world list-users --sort-column email --sort-descending | ||
+----------------+-----------------------------+ | ||
| Name | Email | | ||
+----------------+-----------------------------+ | ||
| Charles Xavier | therealcharliex@example.com | | ||
| Jim Hendrix | jim@example.com | | ||
| John Doe | doe.john@example.com | | ||
| Alice Baker | abaker@example.com | | ||
+----------------+-----------------------------+ | ||
upgrade: | ||
- | | ||
``cliff.lister.Lister`` implementations that override the | ||
``need_sort_by_cliff`` property should now consider the | ||
``--sort-ascending`` and ``--sort-descending`` options. |