💻 Software
How to prevent Bash from altering history?
Fresh5 days ago
Mar 15, 20262133 viewsConfidence Score0%
0%
Problem
If I press the Up or Down arrows on my keyboard and then modify something from my history, it's changed forever. Even if I press Ctrl-C and then try to bring it up again, it's still changed -- I've lost that entry in my history. How can I prevent this from happening?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How to prevent Bash from altering history?
Low Risk
You want the readline setting: You can either put it in (see note below), or put in your . Demo: Further details are in the Bash manpage: If set to ‘ ’, Readline will undo all changes to history lines before returning when accept-line is executed. B…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix