Skip to content

Commit

Permalink
plugins/history: Add autoshare to $HISTCONTROL
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelicWizard committed Sep 10, 2021
1 parent 102cc59 commit b15ae7b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/available/history.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit b15ae7b

Please sign in to comment.