Hi Andrea This would appear to be an issue with the readline library, rather than Bash itself.
As you've noted that it's timing-sensitive, I'm wondering if it's related to bytes received immediately prior, so to investigate this would it be possible to run Bash inside a "script" session, until you encounter one of these events? This will need GNU script as it accepts extension options -I, -O, and -T; each of these takes an output filename argument, to record input, output, and timing, respectively. Immediately after one of these events occurs, run "stty -a" and "bind -p" so that the current settings are recorded in the output log; then exit the shell to close the script session. As there are some significant caveats, please read "man script" (or https://man7.org/linux/man-pages/man1/script.1.html) before doing this. -Martin On Sat, 21 May 2022, 01:16 Andrea Monaco, <andrea.mon...@autistici.org> 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'. > > This is minor, but it seems a bug to me. It looks like bash not > substituting the pressed key with history immediately. > > Am I correct? > > > > Andrea Monaco > >