back

by gurjeet·4y ago·view on hn ↗
The history will not be written if either the shell/OS crashes, or if you `unset HIST_FILE` before exiting the shell.
3 comments
Also, in most common cases, won’t be written to history file if the command is prefixed with a space (see HISTCONTROL).
You have a typo: it should be `HISTFILE`, not `HIST_FILE`.
> or if you `unset HIST_FILE`

I figured I'd learn something by putting in the "I'd love to know others" bit, but this is something I didn't know I could do, and is genuinely useful to know!