util-linux/libsmartcols
Karel Zak 529b51706e 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>
2021-03-24 12:43:17 +01:00
..
docs libsmartcols: (docs) add missing references 2020-07-22 10:34:14 +02:00
samples libsmartcols: add sort sunction to the sample 2021-03-24 12:42:58 +01:00
src libsmartcols: introduce default sort column 2021-03-24 12:43:17 +01:00
COPYING docs: use SPDX license names 2018-08-16 14:47:21 +02:00
Makemodule.am libsmartcols: add samples directory 2016-01-25 13:17:43 +01:00
meson.build meson: update sources and dependencies 2021-03-17 15:07:27 +01:00
smartcols.pc.in libsmartcols: add basic files 2014-04-03 12:29:15 +02:00