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

  • palordrolap
    link
    fedilink
    211 months ago

    Can also recommend HISTFILE="", which amounts to the same thing.

    • @RegalPotoo@lemmy.world
      link
      fedilink
      English
      311 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