Commit 964d124e authored by Lennart Poettering's avatar Lennart Poettering

systemctl: don't truncate description when using pager

https://bugs.freedesktop.org/show_bug.cgi?id=35725
parent 441dfe09
...@@ -387,7 +387,7 @@ static void output_units_list(const struct unit_info *unit_infos, unsigned c) { ...@@ -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) { ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment