Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
libsmartcols: introduce default sort column
* add default sort column, set by scols_sort_table() * sort tree according to default sort column also in scols_sort_table_by_tree() The function scols_sort_table() does not sort tree branches if tree is not enabled. The function scols_sort_table_by_tree() does not care if tree is enabled and it always follows parent->child relations. For scols_sort_table_by_tree() we need to follow order in branches if previously scols_sort_table() has been called. For example lsblk calls scols_sort_table(tb, cl); scols_sort_table_by_tree(tb); for list-like output (for example lsblk -P) and users assume the same order as for tree (lsblk --tree). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1940607 Signed-off-by: Karel Zak <kzak@redhat.com>
- Loading branch information
Showing
2 changed files
with
45 additions
and
17 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