|
From: | Šimon Let |
Subject: | Re: [Bug-readline] Executing any bound shell command redraws the prompt which seems unnecessary |
Date: | Sun, 6 Oct 2019 20:05:49 +0200 |
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/
[Prev in Thread] | Current Thread | [Next in Thread] |