Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# History control
HISTFILESIZE=100000
export HISTFILESIZE
HISTSIZE=100000
export HISTSIZE
HISTCONTROL=ignoredups:erasedups
export HISTCONTROL
shopt -s histappend
_bash_history_sync() {
builtin history -a
builtin history -c
builtin history -r
}
history() {
_bash_history_sync
builtin history "$@"
}
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}_bash_history_sync;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.