The undo command fails if invoked via execute-named-command on a
line from the history list:
$ bash --norc -in <<< $'A\n\cPB\c_C'
bash-5.3$ A
bash-5.3$ AC
$ bash --norc -in <<< $'A\n\cPB\exundo\nC'
bash-5.3$ A
bash-5.3$ ABC
AFAICT the rl_maybe_replace_line in _rl_readstr_init is the issue.
Thanks for the report. This looks like the right fix, since we're not
moving off this history entry.
--
``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/