File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,17 @@ about-plugin 'improve history handling with sane defaults'
5
5
# variable when the shell exits, rather than overwriting the file.
6
6
shopt -s histappend
7
7
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'
10
15
11
16
# resize history to 100x the default (500)
12
17
: " ${HISTSIZE:= 50000} "
13
18
14
- # Flush history to disk after each command.
15
- export PROMPT_COMMAND=" history -a;${PROMPT_COMMAND} "
16
-
17
19
function top-history() {
18
20
about ' print the name and count of the most commonly run tools'
19
21
You can’t perform that action at this time.
0 commit comments