Skip to content

Instantly share code, notes, and snippets.

@dragon788
Forked from diginc/.bashrc-history
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dragon788/adc3506bedecde808899 to your computer and use it in GitHub Desktop.
Save dragon788/adc3506bedecde808899 to your computer and use it in GitHub Desktop.
$ grep -ri hist ~/.bashrc | grep -v alias
# don't put duplicate lines or lines starting with space in the history.
#HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
#HISTSIZE=1000
#HISTFILESIZE=2000
export HISTSIZE=100000
export HISTFILESIZE=50000
export HISTCONTROL=ignoredups
export PROMPT_COMMAND="history -a; history -n; $PROMPT_COMMAND"
@dragon788
Copy link
Author

This allows multiple tmux tabs to "inherit" the history from each other tab, it means that multiple commands in a single tab will be in order, but if you are hopping through tabs you may need to search to find the prior command in a specific tab, but that is kind of the point, USE THE HISTORY dude!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment