In bash if we run unset HISTFILE
at the end of the session then it does not save the commands that ran during that session.
But in zsh, after we run unset HISTFILE
or fc -p
, it stops recording commands to history for that session.
unset HISTFILE...secret commands...exit
- it stores
unset HISTFILE
orfc -p
in.zsh_history
- it should be executed before any session, not at the end