Bug 1263560 - It will print many new lines if input a long monitor command till second line
It will print many new lines if input a long monitor command till second line
Status: ASSIGNED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
All Linux
low Severity low
: rc
: 7.5
Assigned To: Gerd Hoffmann
Yiqian Wei
:
Depends On:
Blocks: 1444027
  Show dependency treegraph
 
Reported: 2015-09-16 03:31 EDT by Xujun Ma
Modified: 2017-06-08 08:08 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xujun Ma 2015-09-16 03:31:28 EDT
Description of problem:
It will print many new lines if you input monitor command beyong a line.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.3.0-22.el7.ppc64le

How reproducible:
100%

Steps to Reproduce:
1.Boot a guest with command:
/usr/libexec/qemu-kvm -monitor stdio -vnc 0:59

2.Input some letter beyong a line 


Actual results:
It will print a new line if you input one letter at second line. 

Expected results:
Does't print new line when input command letter at second line.

Additional info:
Comment 2 Gerd Hoffmann 2015-09-25 08:14:48 EDT
Hmm, yes, the line editor could be a bit more clever when it comes to long lines.  But monitor commands are usually short, is that an actual problem in practice?
Comment 3 Xujun Ma 2015-09-28 04:30:37 EDT
Yes,most of the time,the monitor commands we used are short.But sometimes,I used multiplex terminal like tmux to test several guests at the same time,and every terminal is so small that i can't input a normal command as "hot plug" disk with a long path. It's hard to use if user use a small size terminal,so it will be better to use if the issue is fixed.
Comment 5 Gerd Hoffmann 2017-01-10 03:52:37 EST
(In reply to Gerd Hoffmann from comment #2)
> Hmm, yes, the line editor could be a bit more clever when it comes to long
> lines.

Well, not as easy as I expected.  The readline code doesn't know how many cols the terminal has.  It simply handles things with "jump to start of line" and "clear current line" terminal control sequences.  Which works fine as long as the command fits at one line.  There is no easy way to fix this without a rework of the readline code though.
Comment 6 Gerd Hoffmann 2017-01-10 03:54:46 EST
(In reply to Xujun Ma from comment #3)
> Yes,most of the time,the monitor commands we used are short.But sometimes,I
> used multiplex terminal like tmux to test several guests at the same
> time,and every terminal is so small that i can't input a normal command as
> "hot plug" disk with a long path. It's hard to use if user use a small size
> terminal,so it will be better to use if the issue is fixed.

tmux supports vertical terminal splits (tmux split-window -v), so you can have multiple terminals in a single window and still have long lines ...
Comment 7 Gerd Hoffmann 2017-01-10 03:55:47 EST
Defering for 7.5 for now, but I consider this a close/wontfix candidate.

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