Few more options to reduce dups, comments

242048ab603e4cceead6ab38fd758031e46c18e1
Alexis Sellier committed ago 1 parent 54d82628
.zshrc +12 -4
55 55
HISTFILE=~/.zsh_history
56 56
HISTSIZE=65536
57 57
SAVEHIST=65536
58 58
REPORTTIME=10
59 59
60 +
setopt BANG_HIST                 # Treat the '!' character specially during expansion.
61 +
setopt EXTENDED_HISTORY          # Write the history file in the ":start:elapsed;command" format.
62 +
setopt INC_APPEND_HISTORY        # Write to the history file immediately, not when the shell exits.
63 +
setopt SHARE_HISTORY             # Share history between all sessions.
64 +
setopt HIST_EXPIRE_DUPS_FIRST    # Expire duplicate entries first when trimming history.
65 +
setopt HIST_IGNORE_DUPS          # Don't record an entry that was just recorded again.
66 +
setopt HIST_IGNORE_ALL_DUPS      # Delete old recorded entry if new entry is a duplicate.
67 +
setopt HIST_FIND_NO_DUPS         # Do not display a line previously found.
68 +
setopt HIST_SAVE_NO_DUPS         # Don't write duplicate entries in the history file.
69 +
setopt HIST_REDUCE_BLANKS        # Remove superfluous blanks before recording entry.
70 +
60 71
autoload up-line-or-beginning-search
61 72
autoload down-line-or-beginning-search
62 73
63 74
zle -N up-line-or-beginning-search
64 75
zle -N down-line-or-beginning-search
78 89
setopt PROMPT_SUBST
79 90
setopt CORRECT
80 91
setopt COMPLETE_IN_WORD
81 92
setopt NO_IGNORE_EOF
82 93
setopt AUTO_CD
83 -
setopt APPEND_HISTORY
84 -
setopt INC_APPEND_HISTORY
85 -
setopt HIST_REDUCE_BLANKS
86 -
setopt HIST_IGNORE_DUPS
87 94
setopt INTERACTIVECOMMENTS
88 95
96 +
89 97
#
90 98
# Set prompt
91 99
#
92 100
precmd() {
93 101
  local last=$?