]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: wrap default output long lines on terminal
authorKarel Zak <kzak@redhat.com>
Thu, 11 Apr 2019 11:53:03 +0000 (13:53 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 11 Apr 2019 11:53:03 +0000 (13:53 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu.1
sys-utils/lscpu.c

index 3060bfc17d7fc9a78f15ab4ab76156904237115b..e82fa43203726ad0cd9f47df9c584d6cf643314a 100644 (file)
@@ -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
index c967837ff52016e1943777d74cc726898c702f66..774a27b3a0b309c5f81de5d550f5da6beb2e7172 100644 (file)
@@ -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);