[Top][All Lists]

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

Re: [Bug-readline] Disable the "modify history with arrow keys" feature

From: Chet Ramey
Subject: Re: [Bug-readline] Disable the "modify history with arrow keys" feature
Date: Wed, 30 Jan 2019 10:12:44 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/29/19 2:59 AM, 林自均 wrote:
> Hi Chet,
> Thank you for the explanation. I tried "revert-all-at-newline", but it's
> not what I wanted. What I wish is:
> 1. Use arrow key to navigate to a history command (e.g., "echo 5566").
> 2. Modify the command (e.g., change to "echo 7788").
> 3. Instead of hitting enter to execute it, use arrow keys to navigate to
> other commands.
> 4. Ctrl+C
> 5. The history is NOT modified (i.e., "echo 5566" WON'T BE CHANGED to "echo
> 7788").
> Is that possible?

What I wrote is accurate: "This is  pretty well baked in to how readline
operates." The history editing and undo list behavior is a fundamental part
of readline, and there isn't a way to completely disable it. The
`revert-all-at-newline' option is the way to undo its effects after the
fact, but that doesn't get invoked when you interrupt readline's processing
with SIGINT.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/

reply via email to

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