bug-bash
[Top][All Lists]
Advanced

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

Re: UP does not invoke line history immediately


From: Chet Ramey
Subject: Re: UP does not invoke line history immediately
Date: Wed, 25 May 2022 16:46:26 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

On 5/20/22 11:16 AM, Andrea Monaco wrote:

In rare cases, the following happens to me: when I press UP and then RET
to execute the last command line, and the two presses are close enough
in time, bash takes the UP key as input without invoking history, so it
tries to execute something like '^[[A'.

I can't reproduce this. The only thing I can think of is that the newline
gets added to the key sequence, so it doesn't match the arrow key.
Readline uses a timeout to determine whether input is to be considered
part of the current accumulating key sequence, but even when I press
newline much less than half a second (the default timeout) after the up
arrow, I don't get your results.

If you want to try to reproduce it reliably, the readline variable
"keyseq-timeout", specified in milliseconds, is what readline uses to
distinguish whether input should be added to the current key sequence.
You could try setting it to different values.

--
``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]