]> git.ipfire.org Git - thirdparty/systemd.git/commit
format-table: add new helper table_print_with_pager()
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Jan 2021 16:36:53 +0000 (17:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 Jan 2021 17:14:21 +0000 (18:14 +0100)
commite676b4fc8bbf1e7e602d839721b092fd58aacc05
tree158e5ab51902f31fed06cfccf6300d661806dce0
parent9b25429cb4e9b71e25cd9094ff2bbe3351aa9329
format-table: add new helper table_print_with_pager()

This adds a new function table_print_with_pager() which is a wrapper
around table_print_json()/table_print() but spawns a pager first, if
that's enabled, and optionally turns off the header line of the table.

This addresses the fact that many of our tools actually keep doing very
this very similar stuff, over and over again. Let's unify this in one
place.
src/shared/format-table.c
src/shared/format-table.h