On 6/16/18 1:23 PM, ker...@new.rednsx.org wrote:

> Bash Version: 4.2
> Patch Level: 46
> Release Status: release
> 
> Description:
>       when you edit a line from your bash history, history shows the edited 
> version, even if you never ran it

Yes. Each in-memory history entry can be edited aribitrarily, and each has
an individual list of changes to undo (if you see an asterisk preceding a
history entry when you list the history lines, it means the line has been
modified). When you execute a modified history line, readline reverts the
line to its original state by unwinding the changes. You can set the
`revert-all-at-newline' variable to force readline to undo all  changes to
modified history lines whenever it reads a newline and returns.

By default, the history library writes the contents of the in-memory
history list to the history file, including modified lines. If you don't
want this, set `revert-all-at-newline'.

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

Reply via email to