Hacker News new | ask | show | jobs
by cuu508 894 days ago
History can also contain potentially sensitive things like hostnames of non-public systems, usernames, filenames, URLs. I would not want that stuff to hang around indefinitely.
2 comments

You can tell your shell to ignore commands started with a space

    HISTCONTROL=ignorespace
Or you can use HISTIGNORE to always ignore specific patterns.
You can also use

    HISTCONTROL=ignoreboth
to use both ignorespace and ignoredups
This is one thing that atuin announced to solve: ignore patterns, keys, passwords. From the announcement I got that it's going to be far more useful than HISTIGNORE. Both out of the box and in abilities.