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 c...@case.edu http://tiswww.cwru.edu/~chet/