3 ms·
See the HISTCONTROL environment variable in bash (and maybe something similar in other shells): HISTCONTROL A colon-separated list of values contro
by ams6110 10y ago
See the HISTCONTROL environment variable in bash (and maybe something similar in other shells):
HISTCONTROL
A colon-separated list of values controlling how commands are
saved on the history list. If the list of values includes
"ignorespace", lines which begin with a space character are not
saved in the history list.
[...]
This is convenient because any time you don't want a command saved in history, just start it with a leading space.
Also look at HISTIGNORE for finer grained control.