Selaa lähdekoodia

Shared history is more annoying than you'd think

Tom McKenzie 7 vuotta sitten
vanhempi
sitoutus
1955f859c0
1 muutettua tiedostoa jossa 9 lisäystä ja 7 poistoa
  1. 9 7
      .zshrc.d/history.zsh

+ 9 - 7
.zshrc.d/history.zsh

@@ -2,14 +2,16 @@ HISTFILE=~/.zsh_history
 HISTSIZE=30000
 SAVEHIST=25000
 
-# ignore sequential duplicates
-setopt hist_ignore_dups
+# ignore duplicates (on find and on history file save)
+setopt HIST_FIND_NO_DUPS
+setopt HIST_SAVE_NO_DUPS
 
 setopt hist_reduce_blanks
 
-# shared history across shells
-setopt APPEND_HISTORY
+# shared chronological history in log
 setopt INC_APPEND_HISTORY
+# shared history across shells
+# setopt share_history
 
 # list choices on ambiguous completion
 # use BASH_AUTO_LIST to require a second keypress
@@ -18,10 +20,10 @@ setopt AUTO_LIST
 # don't list on unambiguous prefix
 setopt LIST_AMBIGUOUS
 
-# share history between terminals
-setopt share_history
-
 # bind to zsh-history-substring-search
 bindkey '^[[A' history-substring-search-up
 bindkey '^[[B' history-substring-search-down
 
+# ^R = pattern-enabled search
+bindkey '^R' history-incremental-pattern-search-backward
+