bug-bash
[Top][All Lists]
Advanced

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

Re: Behavior change


From: Chet Ramey
Subject: Re: Behavior change
Date: Tue, 27 Oct 2020 09:29:09 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.3.3

On 10/26/20 5:58 PM, Gregory Heytings via Bug reports for the GNU Bourne
Again SHell wrote:
> 
> Hi,
> 
> I just installed Bash 5.1 rc1.  I have IGNOREEOF set, and in 5.0 (and
> earlier version) when pressing C-d one sees:
> 
> $ Use "logout" to leave the shell.
> 
> With 5.1 rc1 there is a newline between the prompt and the message:
> 
> $
> Use "logout" to leave the shell.
> 
> Is this change intentional?

It's bracketed paste, which is enabled by default in bash-5.1-rc1. The
escape sequence that readline sends to the terminal to turn off bracketed
paste ends with a carriage return, to avoid confusing the Linux terminal
driver about the physical location of the cursor, so the cursor ends up at
column 0. If readline has seen EOF, the shell is going to print something
one way or another, and that text will overwrite what is on the current
screen line. Readline outputs a newline to compensate.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903936 for an
example.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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