[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: history shows edited lines not the lines actually ran
From: |
L A Walsh |
Subject: |
Re: history shows edited lines not the lines actually ran |
Date: |
Sat, 16 Jun 2018 21:03:23 -0700 |
User-agent: |
Thunderbird |
kermit@new.rednsx.org wrote:
Description:
when you edit a line from your bash history, history shows the edited
version, even if you never ran it
ewriting history is generally considered bad in most contexts,
----
Only if you do something to a relative
that causes you not to be born. (humor)
and i found this to be counter intuitive and can't think of why anyone would
want it this way
Bash history isn't an audit trail. It's a convenience for the user and
a way to be able to recall commands and how you did something 2 years
ago (if you keep your history around and keep it searchable).
As for usefulness... haven't you ever had to type in a password on the
command line? Or, at least had it be easier to do so, but I really
don't like
leaving it in a file, so I usually scroll up to the line w/the password and
just delete the line. Problem solved.
As for adding things I never did -- not something I've ever had a need
for, so never have done it. But the delete and merging of duplicates across
history files (they are recorded / terminal, so they usually don't overwrite
each other unless I start another copy of bash to preserve a previous
environment.