Editing history in bash
Posted
by nameanyone
on Stack Overflow
See other posts from Stack Overflow
or by nameanyone
Published on 2010-03-16T23:02:55Z
Indexed on
2010/03/17
0:51 UTC
Read the original article
Hit count: 436
In bash, when I go back in history, edit some command and run it, this edited command is appended to history and the original one is left intact. But every once in a while I somehow manage to affect the original command, i.e. my edit replaces the original command back in history. I can't put my finger on how this happens. Can someone explain? My goal is to avoid this, so any edit to a previous command always gets appended to history and never replaces the original.
© Stack Overflow or respective owner