-
-
Save AlexKordic/1c3001308f8c02ce76ce99fecb0c5728 to your computer and use it in GitHub Desktop.
Save unlimited bash history in OSX
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
# save history to ~/.bash_history as soon as command is run | |
export PROMPT_COMMAND='history -a' | |
# save unlimited history | |
# osx doesn't seem to respect =-1 or = options | |
export HISTSIZE=9999999999 | |
export HISTFILESIZE=999999999 | |
# osx doesn't actually respect this and it'll fall back to unix timestamp (which we want) | |
export HISTTIMEFORMAT="%d/%m/%y %T " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment