image of a cat looking at a bunch of paper a woman shows it, with the header “cat ~/.bash_history”

    • RegalPotoo@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 months ago

      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