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: Martin D Kealey
Subject: Re: UP does not invoke line history immediately
Date: Sat, 21 May 2022 02:39:25 +1000

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.monaco@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
>
>


reply via email to

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