bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: corrupted input after size function (input that's not recorded by ba


From: Greg Wooledge
Subject: Re: corrupted input after size function (input that's not recorded by bash)
Date: Fri, 14 Jun 2013 08:18:05 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Jun 13, 2013 at 04:42:36PM -0700, Linda Walsh wrote:
> Chris F.A. Johnson wrote:
> >   The baskspaces (\b) are erasing your input, not the function's
> >   output.

That's incorrect.  A backspace character sent to a terminal device
moves the cursor (or does whatever else the terminal chooses to do
when it receives the character) but has no effect on the input buffer.

>       Second problem with that theory, I resize the window and see
> the output... THEN, I type a command and the first word is ignored.

For what it's worth, I cannot reproduce this in a simple test.  I opened
a new window, and then:

imadev:~$ showsize() { echo xyz; }; trap showsize SIGWINCH
imadev:~$ 

The function and trap have been defined.  Then I resized the window,
and xyz (plus newline) appeared as expected.  I typed "echo foo" and
pressed Enter, and got the expected result.

imadev:~$ xyz
echo foo
foo
imadev:~$ 

This makes me continue to suspect that the problem is being triggered by
something else in your setup (possibly multiple things working together).

You might try to reproduce the problem in a simpler setup, to see if you
can isolate what factors must be present for it to occur.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]