Bug 610932 - nmcli(1) output should fit in 80 columns without wrapping
Summary: nmcli(1) output should fit in 80 columns without wrapping
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 14
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jirka Klimes
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-02 19:10 UTC by David Zeuthen
Modified: 2016-01-04 06:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-08-16 18:27:50 UTC

Attachments (Terms of Use)

Description David Zeuthen 2010-07-02 19:10:58 UTC
It may sound silly and like a request from the 1990s but it would be really nice if nmcli(1) output would fit in 80 column without wrapping. Most other command-line tools (ps, top, skdump etc.), even modern ones, try do do this. Thanks.

Comment 1 Jirka Klimes 2010-07-09 11:43:17 UTC
Even if it may seem easy on first look, it is actually quite tricky to work out
a good output.  There are always contradicting demands; here mainly
effort to show as much information as possible and restricted screen width.

Although I understand the request is valid for some configurations, it would
limit nmcli quite a lot.
Nevertheless, I think the current output is quite flexible and can fit in 80
columns in 'multiline' mode or with selecting only some fields in 'tabular'.
nmcli -m multiline nm
nmcli -m multiline con status
nmcli -f NAME,DEVICES,SCOPE con status

There are two modes of output:
* tabular
It presents information in tables. Each line represents a separate entry. And
columns are particular properties. It tends to produce wide output, when there
are many columns. However, it is possible to select only some columns using
'--fields' option.
nmcli -f NAME,TYPE,SCOPE con list
Tabular mode is default for most commands.

* multiline
This mode is basically orthogonal to tabular mode. It presents each entry on
multiple lines (each field (column in tabular mode) is on a separate line).
Thus the 80-columns restriction can be met here. This mode is default for more
verbose outputs. Currently:
’nmcli con list id|uuid <name>’
’nmcli dev list’

These two modes can be combined with 'terse' output for machine parsing, or
'pretty' output to get some headers and separators to ease readability.

So I think even now, there is a possibility to have < 80 columns output,
even if not as default.

I can imagine that we could try to print just some columns to stay below 80
characters in tabular mode, i.e. redefine default 'common' fields. But I don't
like this idea much; that would render the output not very informative.

Maybe, the better approach would be introducing additional '--fields' option
'stay_within_80_chars' (needs a better name of course ;)), in addition to
'common' and 'all'. That would pick just most important fields that fit in 80 cols. However 'common' would stay default. Hmm, I'll try to think about that.


Comment 2 Bug Zapper 2010-07-30 12:24:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:

Comment 3 Fedora End Of Life 2012-08-16 18:27:52 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Note You need to log in before you can comment on or make changes to this bug.