From 75d29de3cc3ad136c4c7520f028e7a90d26177f4 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 12 Oct 2017 00:19:10 +0200 Subject: [PATCH] initctl: Use entire screen width for task/service description Signed-off-by: Joachim Nilsson --- src/initctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/initctl.c b/src/initctl.c index d2f1571f..f7b18f93 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -512,6 +512,7 @@ static int show_status(char *arg) printf("%-10.10s ", lvls); if (!verbose) { + int adj = screen_cols - 58; char *name = strrchr(svc->cmd, '/'); if (!name) @@ -519,7 +520,7 @@ static int show_status(char *arg) else name++; - printf("%-20.20s %-21.21s\n", name, svc->desc); + printf("%-20.20s %-*.*s\n", name, adj, adj, svc->desc); continue; }