From f168919da87a3521d19c0ea6879b134708ee3046 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 22 Feb 2023 13:40:53 +0100 Subject: [PATCH] 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". --- src/systemctl/systemctl-list-units.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/systemctl/systemctl-list-units.c b/src/systemctl/systemctl-list-units.c index 86e7311d3c..93dd4b7dfd 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;