2022-08-23 23:44:56 +00:00
|
|
|
#####################################################################
|
2020-11-10 23:14:06 +00:00
|
|
|
|
2024-08-16 15:41:26 +00:00
|
|
|
HISTFILE="${XDG_STATE_HOME}/zsh/history"
|
2024-05-07 22:38:40 +00:00
|
|
|
HISTSIZE=10000
|
|
|
|
SAVEHIST=10000
|
2020-11-04 19:57:36 +00:00
|
|
|
|
2022-04-04 17:05:27 +00:00
|
|
|
setopt appendhistory autocd beep notify HIST_IGNORE_SPACE
|
2020-11-04 19:57:36 +00:00
|
|
|
unsetopt nomatch
|
|
|
|
|
|
|
|
bindkey -v
|
2021-09-16 21:09:36 +00:00
|
|
|
bindkey '^R' history-incremental-search-backward
|
|
|
|
|
2024-05-07 22:38:40 +00:00
|
|
|
# ESC,v to use $EDITOR to modify the current command
|
2021-09-16 21:09:36 +00:00
|
|
|
autoload edit-command-line
|
2022-08-23 23:44:56 +00:00
|
|
|
zle -N edit-command-line
|
|
|
|
bindkey -M vicmd v edit-command-line
|
2021-09-16 21:09:36 +00:00
|
|
|
|
2024-05-07 22:38:40 +00:00
|
|
|
# zsh auto/tab-completion engine
|
2022-08-23 23:44:56 +00:00
|
|
|
zmodload -i zsh/complist
|
2024-05-07 22:38:40 +00:00
|
|
|
autoload -Uz compinit
|
2024-08-16 15:41:26 +00:00
|
|
|
compinit -d "${XDG_CACHE_HOME}/zsh/zcompdump-${ZSH_VERSION}"
|
2024-05-07 22:38:40 +00:00
|
|
|
|
2020-11-04 19:57:36 +00:00
|
|
|
zstyle ':completion:*' completer _complete _ignored _approximate
|
2021-02-23 16:20:37 +00:00
|
|
|
zstyle ':completion:*' max-errors 1
|
2022-08-23 23:44:56 +00:00
|
|
|
zstyle ':completion:*' menu select
|
2024-08-16 15:41:26 +00:00
|
|
|
zstyle ':completion:*' cache-path "${XDG_CACHE_HOME}/zsh/zcompcache"
|
2022-08-23 23:44:56 +00:00
|
|
|
bindkey -M menuselect '^M' .accept-line
|
2020-11-04 19:57:36 +00:00
|
|
|
|
2022-08-23 23:44:56 +00:00
|
|
|
#####################################################################
|
2024-05-07 22:38:40 +00:00
|
|
|
return 0
|