bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] Executing any bound shell command redraws the prompt


From: Chet Ramey
Subject: Re: [Bug-readline] Executing any bound shell command redraws the prompt which seems unnecessary
Date: Thu, 3 Oct 2019 13:49:26 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10/2/19 4:47 PM, Šimon Let wrote:
> Version: GNU bash, version 5.0.9(1)-release (x86_64-pc-linux-gnu)
> 
> Description (steps to reproduce):
> Create a dummy shell function: `funcX(){ local x=1; }`
> Bind shell command/function: `bind -x '"\C-x": funcX'`
> Hold down the "C-x" key.
> The prompt will flicker. 
> 
> I suspect that the prompt is being redrawn with each execution of the shell
> command.

Bash and Readline don't know what this arbitrary command the produces
arbitrary output does to the contents of the terminal, or where it leaves
the cursor. It has to redraw at least the last line of the prompt, so it
knows the physical cursor location and can do redisplay.

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



reply via email to

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