Not quite. Unsetting HISTFILE, or setting it to an invalid path will mean the shell doesn’t update the history file while it quits. set +o history makes the shell stop recording until you do set -o history, which is useful if you want shell history generally, but don’t want some specific commands to be recorded - if you just unset HISTFILE, the commands still show up if you press the up arrow
Can also recommend
HISTFILE=""
, which amounts to the same thing.Not quite. Unsetting
HISTFILE
, or setting it to an invalid path will mean the shell doesn’t update the history file while it quits.set +o history
makes the shell stop recording until you doset -o history
, which is useful if you want shell history generally, but don’t want some specific commands to be recorded - if you just unset HISTFILE, the commands still show up if you press the up arrowReal OGs put a space right after the prompt.