[Cialug] HISTIGNORE Question

Todd Walton tdwalton at gmail.com
Wed Jun 20 16:29:15 UTC 2018


It appears to me that if I set $HISTIGNORE to something like this: 'ls*',
then when I enter "ls -al ~/mydirectory" at the command line it doesn't go
into history. Hooray. That's the correct behavior. But this would also not
go into history: "ls -al ~/mydirectory; vim /etc/passwd; echo ha ha
suckers".

That seems like a bad design. I wouldn't expect bash history to be made to
resist manipulation by a person-of-ill-intent. That's out of scope for
that. But even a legitimate user could accidentally preface a command
they'd like to keep with a command they don't care about, overlooking the
fact that it would prevent the command they'd like to keep from going into
history.

Can HISTIGNORE be written to prevent that situation?

--
Todd, off to experiment


More information about the Cialug mailing list