From: Lennart Poettering Date: Wed, 22 Feb 2023 12:40:53 +0000 (+0100) Subject: systemctl: right-align left/passed columns in list-timers X-Git-Tag: v254-rc1~1189^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f168919da87a3521d19c0ea6879b134708ee3046;p=thirdparty%2Fsystemd.git systemctl: right-align left/passed columns in list-timers Timespans are probably best right-aligned, in particular if they systematically end in either " ago" or " left" because they are used as "relative timestamps". --- diff --git a/src/systemctl/systemctl-list-units.c b/src/systemctl/systemctl-list-units.c index 86e7311d3c4..93dd4b7dfd2 100644 --- a/src/systemctl/systemctl-list-units.c +++ b/src/systemctl/systemctl-list-units.c @@ -616,6 +616,9 @@ static int output_timers_list(struct timer_info *timer_infos, size_t n) { table_set_ersatz_string(table, TABLE_ERSATZ_DASH); + (void) table_set_align_percent(table, table_get_cell(table, 0, 1), 100); + (void) table_set_align_percent(table, table_get_cell(table, 0, 3), 100); + for (struct timer_info *t = timer_infos; t < timer_infos + n; t++) { _cleanup_free_ char *unit = NULL;