feat: better zsh completion
This commit is contained in:
@@ -65,12 +65,20 @@
|
|||||||
bindkey -v
|
bindkey -v
|
||||||
|
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
|
setopt MENU_COMPLETE
|
||||||
|
zmodload zsh/complist
|
||||||
|
|
||||||
autoload -U history-search-end
|
autoload -U history-search-end
|
||||||
zle -N history-beginning-search-backward-end history-search-end
|
zle -N history-beginning-search-backward-end history-search-end
|
||||||
zle -N history-beginning-search-forward-end history-search-end
|
zle -N history-beginning-search-forward-end history-search-end
|
||||||
bindkey "^[OA" history-beginning-search-backward-end
|
bindkey "^[OA" history-beginning-search-backward-end
|
||||||
bindkey "^[OB" history-beginning-search-forward-end
|
bindkey "^[OB" history-beginning-search-forward-end
|
||||||
|
if [[ -n "''${terminfo[kcbt]}" ]]; then
|
||||||
|
bindkey "''${terminfo[kcbt]}" reverse-menu-complete
|
||||||
|
bindkey -M menuselect "''${terminfo[kcbt]}" reverse-menu-complete
|
||||||
|
fi
|
||||||
|
bindkey "^[[Z" reverse-menu-complete
|
||||||
|
bindkey -M menuselect "^[[Z" reverse-menu-complete
|
||||||
|
|
||||||
zstyle ':completion:*' completer _extensions _complete _approximate
|
zstyle ':completion:*' completer _extensions _complete _approximate
|
||||||
zstyle ':completion:*' use-cache on
|
zstyle ':completion:*' use-cache on
|
||||||
@@ -79,7 +87,7 @@
|
|||||||
zstyle ':completion:*' complete-options true
|
zstyle ':completion:*' complete-options true
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
zstyle ':completion:*' keep-prefix true
|
zstyle ':completion:*' keep-prefix true
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu yes select=1
|
||||||
zstyle ':completion:*' list-grouped false
|
zstyle ':completion:*' list-grouped false
|
||||||
zstyle ':completion:*' list-separator '''
|
zstyle ':completion:*' list-separator '''
|
||||||
zstyle ':completion:*' group-name '''
|
zstyle ':completion:*' group-name '''
|
||||||
|
|||||||
Reference in New Issue
Block a user