Skip to content

Commit 15a79e0

Browse files
committed
plugins/history: Add autoshare to $HISTCONTROL
1 parent e70ab94 commit 15a79e0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plugins/available/history.plugin.bash

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ about-plugin 'improve history handling with sane defaults'
55
# variable when the shell exits, rather than overwriting the file.
66
shopt -s histappend
77

8-
# erase duplicates; alternative option: HISTCONTROL=ignoredups
9-
: "${HISTCONTROL:=ignorespace:erasedups}"
8+
# 'ignorespace': don't save command lines which begin with a space to history
9+
# 'erasedups' (alternative 'ignoredups'): don't save duplicates to history
10+
# 'autoshare': automatically share history between multiple running shells
11+
: "${HISTCONTROL:=ignorespace:erasedups:autoshare}"
12+
13+
safe_append_preexec '_bash_it_history_auto_save'
14+
safe_append_prompt_command '_bash_it_history_auto_load'
1015

1116
# resize history to 100x the default (500)
1217
: "${HISTSIZE:=50000}"

0 commit comments

Comments
 (0)