Skip to content

Instantly share code, notes, and snippets.

@brianjlandau
Last active March 11, 2016 19:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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