Improve command history
This commit is contained in:
parent
06493b92c6
commit
8c82261cc1
@ -1,3 +1,5 @@
|
|||||||
|
# Make all shells append to history file instantly
|
||||||
|
setopt INC_APPEND_HISTORY
|
||||||
|
|
||||||
# Handles case-insensitive completion
|
# Handles case-insensitive completion
|
||||||
autoload -Uz compinit && compinit
|
autoload -Uz compinit && compinit
|
||||||
@ -5,8 +7,15 @@ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
|||||||
|
|
||||||
# Configure command history
|
# Configure command history
|
||||||
HISTFILE=~/.histfile
|
HISTFILE=~/.histfile
|
||||||
HISTSIZE=1000
|
HISTSIZE=100000
|
||||||
SAVEHIST=1000
|
SAVEHIST=100000
|
||||||
|
|
||||||
|
# Ignore duplicates in history search, and dont't write them either
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
|
||||||
|
# Ignore commands starting with a space
|
||||||
|
setopt HIST_IGNORE_SPACE
|
||||||
|
|
||||||
# Allow up arrow to be used to go back in history based on current line contents
|
# Allow up arrow to be used to go back in history based on current line contents
|
||||||
autoload -U up-line-or-beginning-search
|
autoload -U up-line-or-beginning-search
|
||||||
@ -14,4 +23,4 @@ autoload -U down-line-or-beginning-search
|
|||||||
zle -N up-line-or-beginning-search
|
zle -N up-line-or-beginning-search
|
||||||
zle -N down-line-or-beginning-search
|
zle -N down-line-or-beginning-search
|
||||||
bindkey "^[[A" up-line-or-beginning-search # Up
|
bindkey "^[[A" up-line-or-beginning-search # Up
|
||||||
bindkey "^[[B" down-line-or-beginning-search # Down
|
bindkey "^[[B" down-line-or-beginning-search # Down
|
||||||
|
Loading…
x
Reference in New Issue
Block a user