From e13d9735e30ea3e67107f44e7a0ab2808132ed72 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Wed, 11 Feb 2015 21:08:20 +0000 Subject: [PATCH] History mod in bashrc --- bashrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bashrc b/bashrc index 3db86bc..8053a75 100644 --- a/bashrc +++ b/bashrc @@ -124,3 +124,12 @@ export WORKON_HOME=~/.virtualenvs . /usr/local/bin/virtualenvwrapper.sh . ~/dotfiles/z.sh source ~/.bash_prompt + + +export HISTCONTROL=ignoredups:erasedups # no duplicate entries +export HISTSIZE=100000 # big big history +export HISTFILESIZE=100000 # big big history +shopt -s histappend # append to history, don't overwrite it + +# Save and reload the history after each command finishes +export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"