bug-bash
[Top][All Lists]
Advanced

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

Re: Hard-wrapped commands are displayed incorrectly after READLINE_LINE


From: Chet Ramey
Subject: Re: Hard-wrapped commands are displayed incorrectly after READLINE_LINE is changed
Date: Sat, 12 Mar 2016 14:55:48 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 3/11/16 6:10 AM, Lauri Ranta wrote:

> Bash Version: 4.3
> Patch Level: 42
> Release Status: release
> 
> With for example `bind -x '"\ea":READLINE_LINE='` and `PS1='$ '`, if the 
> width of a shell window is 20 characters so that the 30 character command
> 
>     $ aaaaaaaaaaaaaaaaaa
>     aaaaaaaaaaaa
> 
> is displayed on two lines, after pressing `\ea`, the command is displayed as
> 
>     $ aaaaaaaaaaaaaaaaaa
>     $
> 
> if the point is on the second line or as
> 
>     $
>     aaaaaaaaaaaa
> 
> if the point is on the first line.

Yes, bash redraws the current line and does not erase the rest of the
previous line contents.  This is an artifact of how bash clears the current
line before running the command specified by `bind -x'.  I'll take a look
at fixing this, but probably not before bash-4.4.

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



reply via email to

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