bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] readstr: do not clear undo list


From: Chet Ramey
Subject: Re: [PATCH] readstr: do not clear undo list
Date: Thu, 30 May 2024 12:23:40 -0400
User-agent: Mozilla Thunderbird

On 5/27/24 7:56 PM, Grisha Levit wrote:
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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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