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

  • @RegalPotoo
    link
    English
    811 months ago

    Talk to your cat about set +o history before they end up leaking credentials

    • palordrolap
      link
      fedilink
      211 months ago

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

      • @RegalPotoo
        link
        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