systemctl: don't truncate description when using pager

https://bugs.freedesktop.org/show_bug.cgi?id=35725
This commit is contained in:
Lennart Poettering 2011-03-29 18:32:46 +02:00
parent 441dfe092a
commit 964d124efa

View File

@ -387,7 +387,7 @@ static void output_units_list(const struct unit_info *unit_infos, unsigned c) {
if (on_tty()) { if (on_tty()) {
printf("%-25s %-6s %-*s %-*s %-*s", "UNIT", "LOAD", printf("%-25s %-6s %-*s %-*s %-*s", "UNIT", "LOAD",
active_len, "ACTIVE", sub_len, "SUB", job_len, "JOB"); active_len, "ACTIVE", sub_len, "SUB", job_len, "JOB");
if (columns() >= 80+12 || arg_full) if (columns() >= 80+12 || arg_full || !arg_no_pager)
printf(" %s\n", "DESCRIPTION"); printf(" %s\n", "DESCRIPTION");
else else
printf("\n"); printf("\n");
@ -440,7 +440,7 @@ static void output_units_list(const struct unit_info *unit_infos, unsigned c) {
if (u->job_id == 0) if (u->job_id == 0)
printf(" %-*s", job_len, ""); printf(" %-*s", job_len, "");
if (arg_full) if (arg_full || !arg_no_pager)
printf(" %s", u->description); printf(" %s", u->description);
else else
printf(" %.*s", columns() - a - b - 1, u->description); printf(" %.*s", columns() - a - b - 1, u->description);