From b8910af5a67db98bea9111c648ab224625c46784 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 11 Apr 2019 13:53:03 +0200 Subject: lscpu: wrap default output long lines on terminal Signed-off-by: Karel Zak --- sys-utils/lscpu.1 | 5 ++++- sys-utils/lscpu.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'sys-utils') diff --git a/sys-utils/lscpu.1 b/sys-utils/lscpu.1 index 3060bfc17..e82fa4320 100644 --- a/sys-utils/lscpu.1 +++ b/sys-utils/lscpu.1 @@ -29,7 +29,10 @@ column labels are not case sensitive. .sp Not all columns are supported on all architectures. If an unsupported column is specified, \fBlscpu\fP prints the column but does not provide any data for it. - +.sp +The default output formatting on terminal maybe optimized for better +readability. The output for non-terminals (e.g. pipes) is never affected by +this optimization and it is always in "Field: data\\n" format. .SS COLUMNS Note that topology elements (core, socket, etc.) use a sequential unique ID starting from zero, but CPU logical numbers follow the kernel where there is diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index c967837ff..774a27b3a 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -1954,7 +1954,7 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) } if (scols_table_new_column(tb, "field", 0, 0) == NULL || - scols_table_new_column(tb, "data", 0, SCOLS_FL_NOEXTREMES) == NULL) + scols_table_new_column(tb, "data", 0, SCOLS_FL_NOEXTREMES | SCOLS_FL_WRAP) == NULL) err(EXIT_FAILURE, _("failed to initialize output column")); add_summary_s(tb, _("Architecture:"), desc->arch); -- cgit v1.2.3-55-g7522