Last active
August 31, 2024 09:07
-
-
Save koveseb/83a3a6a622a895270092e8dec57da655 to your computer and use it in GitHub Desktop.
Eternal bash history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Eternal bash history. | |
# --------------------- | |
# Undocumented feature which sets the size to "unlimited". | |
# http://stackoverflow.com/questions/9457233/unlimited-bash-history | |
export HISTFILESIZE= | |
export HISTSIZE= | |
export 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 | |
export 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