$HISTIGNORE
–
List of patterns to control what’s saved in the history
$HISTIGNORE
is a colon-separated list of patterns.
Commands, which are matched by one of the patterns, are excluded from the history and not stored.
Ignored commands are removed from history and also can’t be recalled with the UP or DOWN keys.
Links
Examples
- Exclude
history
and anysudo
command from your history: 1
export HISTIGNORE='history:sudo*'
BashSupport Pro is a Bash IDE with support for $HISTIGNORE – try it now!