[PATCH] _rl_abort_internal: reset _rl_command_to_execute

2024-12-13 Thread Grisha Levit
If a key sequence ending with an isearch terminator is bound to a function that longjmps, entering such a sequence during an isearch causes readline to loop forever. echo '".\e": end-kbd-macro' > irc INPUTRC=irc bash --norc -in <<< $'X\n\cRX.\e' --- lib/readline/util.c | 1 + 1 file chang

Re: history-search-* and undo lists

2024-12-13 Thread Grisha Levit
On Thu, Dec 12, 2024 at 5:03 PM Chet Ramey wrote: > > On 12/12/24 2:07 PM, Grisha Levit wrote: > > > FWIW there's still a use-after-free with something like: > > > > HISTFILE= INPUTRC=/ bash --norc -in <<< $'X\n\cPX\cR\n!\e3X\e^\n\cP' > > Thanks for the report. See also (incl. after today's fix):

Re: PIPESTATUS differs from $? for compound command

2024-12-13 Thread Dale R. Worley
Chet Ramey writes: > On 12/11/24 9:54 PM, Dale R. Worley wrote: >> This needs to be corrected to note that compound commands that are not >> one component of a multi-command pipeline do not cound as pipelines for >> setting PIPESTATUS. Exactly which compounds commands don't set >> PIPESTATUS need

Re: PIPESTATUS differs from $? for compound command

2024-12-13 Thread Martin D Kealey
I started writing a response early in this thread and then set it aside. My initial impression was that excluding most compound commands from being reported in PIPESTATUS was at best questionable, but now I'm thinking otherwise. It is obviously useful to be able to inspect PIPESTATUS after compoun

history -s from inside function replaces last command rather than adding to it

2024-12-13 Thread Bug Maybefound
Configuration Information [Automatically generated, do not change]: Machine: aarch64 OS: darwin21.6.0 Compiler: clang Compilation CFLAGS: -DSSH_SOURCE_BASHRC -DDEFAULT_LOADABLE_BUILTINS_PATH='/opt/homebrew/Cellar/bash/5.2.37/lib/b$ uname output: Darwin mini.home 21.6.0 Darwin Kernel Version 21.6.