diff --git a/plugins/available/history.plugin.bash b/plugins/available/history.plugin.bash index ac7dea0aee..bc6a6e2756 100644 --- a/plugins/available/history.plugin.bash +++ b/plugins/available/history.plugin.bash @@ -5,8 +5,13 @@ about-plugin 'improve history handling with sane defaults' # append to bash_history on exit. shopt -s histappend -# erase duplicates; alternative option: HISTCONTROL=ignoredups -: "${HISTCONTROL:=ignorespace:erasedups}" +# 'ignorespace': don't save command lines which begin with a space to history +# 'erasedups' (alternative 'ignoredups'): don't save duplicates to history +# 'autoshare': automatically share history between multiple running shells +: "${HISTCONTROL:=ignorespace:erasedups:autoshare}" + +safe_append_preexec '_bash_it_history_auto_save' +safe_append_prompt_command '_bash_it_history_auto_load' # resize history to 100x the default (500) : "${HISTSIZE:=50000}"