From 3c9fecf967e8b956ed483cf2910eb16662e02ca9 Mon Sep 17 00:00:00 2001 From: James Cuzella Date: Fri, 11 Mar 2016 11:28:11 -0700 Subject: [PATCH] Make all vars defined in lib/history.bash overridable. Set these before sourcing Bash-It with .bashrc or .bash_profile to override defaults --- lib/history.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/history.bash b/lib/history.bash index d582192b..f7d3303c 100755 --- a/lib/history.bash +++ b/lib/history.bash @@ -2,10 +2,10 @@ # Bash History Handling -shopt -s histappend # append to bash_history if Terminal.app quits -export HISTCONTROL=erasedups # erase duplicates; alternative option: export HISTCONTROL=ignoredups -export HISTSIZE=5000 # resize history size -export AUTOFEATURE=true autotest +shopt -s histappend # append to bash_history if Terminal.app quits +export HISTCONTROL=${HISTCONTROL:-erasedups} # erase duplicates; alternative option: export HISTCONTROL=ignoredups +export HISTSIZE=${HISTSIZE:-5000} # resize history size +export AUTOFEATURE=${AUTOFEATURE:-true autotest} # Cucumber / Autotest integration function rh { history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head