Skip to content

Instantly share code, notes, and snippets.

@yolabingo
Created September 3, 2020 17:13
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 yolabingo/a2323ad9db4ae70912bafb1fd3b292b6 to your computer and use it in GitHub Desktop.
Save yolabingo/a2323ad9db4ae70912bafb1fd3b292b6 to your computer and use it in GitHub Desktop.
# Eternal bash history.
# ---------------------
# Undocumented feature which sets the size to "unlimited".
# http://stackoverflow.com/questions/9457233/unlimited-bash-history
HISTCONTROL=ignoreboth:erasedups
HISTFILESIZE=
HISTSIZE=
HISTTIMEFORMAT="%F %T "
# Change the file location because certain bash sessions truncate .bash_history file upon close.
# http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
HISTFILE=~/.bash_eternal_history
# Force prompt to write history after every command.
# http://superuser.com/questions/20900/bash-history-loss
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment