Skip to content

Instantly share code, notes, and snippets.

@funkatron
Created July 3, 2022 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funkatron/eb775621e1ff5cc992e5c544a423cc14 to your computer and use it in GitHub Desktop.
Save funkatron/eb775621e1ff5cc992e5c544a423cc14 to your computer and use it in GitHub Desktop.
Save bash history after every command
# so you probably want to make this the last line of your .bash_profile, or something similar
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'history -a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment