Skip to content

Instantly share code, notes, and snippets.

@pop
Created July 8, 2015 19:55
Show Gist options
  • Save pop/f07b24ea5715684cbc77 to your computer and use it in GitHub Desktop.
Save pop/f07b24ea5715684cbc77 to your computer and use it in GitHub Desktop.
bash history sync
### This block syncs up my bash history file in my tmux sessons.
# avoid duplicates..
export HISTCONTROL=ignoredups:erasedups
# append history entries..
shopt -s histappend
# After each command, save and reload history
export PROMPT_COMMAND="history -a; history -c; history -r; $@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment