Bug 1576048 - nmcli c s does not wrap lines
Summary: nmcli c s does not wrap lines
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.4
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: sushil kulkarni
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-08 16:16 UTC by lejeczek
Modified: 2018-07-17 14:20 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-17 14:20:34 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description lejeczek 2018-05-08 16:16:46 UTC
Description of problem:

with updated version 1.10.2-13.el7 'nmcli c s' does not wrap lines.
Fedora's version also does not wrap.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Thomas Haller 2018-05-08 16:39:02 UTC
Are you saying, it behaves differently than on rhel-7.4?

How exactly? Can you attach the output of the command? (preferably, before and after)

Comment 3 lejeczek 2018-05-09 09:12:28 UTC
I also tried -p -m $args option to 'nmcli c s $con' and output always does not wrap lines, so if line is longer than terminal width then some information is missing from the output.

Comment 4 lejeczek 2018-05-09 09:14:05 UTC
and it happens both, in rhel with new NetworkManager-1.10.2-13.el7.x86_64 and Fedora(now 28).
Before in rhel output had wrapped/broken long lines and everything was in the output.

Comment 5 Thomas Haller 2018-05-09 09:54:12 UTC
nmcli now spawns a pager, so it sounds you are looking at gnu less.

In less, you can navigate with the arrow keys.

You can pagination, by setting PAGER environment variable, like

  $ PAGER= nmcli ...

or by redirectring the output, like

  $ nmcli ... | cat

Comment 6 lejeczek 2018-05-11 07:53:40 UTC
nonetheless, It should be out-of-box behaviour I think. Would be nice not to have to tweak things.

Comment 7 Beniamino Galvani 2018-05-11 13:11:44 UTC
(In reply to lejeczek from comment #4)
> and it happens both, in rhel with new NetworkManager-1.10.2-13.el7.x86_64
> and Fedora(now 28).
> Before in rhel output had wrapped/broken long lines and everything was in
> the output.

I think the pager is useful enabled by default because then you don't need to scroll back to see the beginning of the output, which is very annoying especially for certain commands like 'nmcli connection show $con' which tend to have many lines.

If users prefer not having paged output, it's just simple as setting an empty pager in .bashrc; with the advantage that this also works for other command line tools (systemctl and git come to mind).

Comment 8 Beniamino Galvani 2018-07-17 14:20:34 UTC
As per comments 5 and 7, this is the expected behavior. I'm closing this bug report.


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