Re: [Help-bash] Disable the "modify history with arrow keys" feature
From:
ζθͺε
Subject:
Re: [Help-bash] Disable the "modify history with arrow keys" feature
Date:
Mon, 28 Jan 2019 15:01:53 +0800
Hi,
It turns out that such behavior is not specific to bash. Any interactive
interface using "readline" has such behavior (e.g., Python REPL). I'll ask
this question in the readline mailing list. Thanks.
Best,
John Lin
ζθͺε <address@hidden> ζΌ 2019εΉ΄1ζ23ζ₯ ι±δΈ δΈε4:24ε―«ιοΌ
> Hi,
>
> I found that bash has the following behavior:
>
> 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 modified (e.g., "echo 5566" is changed to "echo 7788").
>
> This feature bothers me a lot since I don't expect that I can modify
> history in such obscure method. Especially the fact that step 3 above is
> necessary to modify the history makes me feel so weird.
>
> Is there any way to disable such behavior? Thanks.
>
> Best,
> John Lin
>