From 91e22af9d6bfe7184901cd0283ed0266fbd88a8f Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 31 Jan 2022 21:20:52 +0100 Subject: [PATCH] Config: Make zsh auto-completion more fancy --- .config/zsh/.zshrc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index f3236e6..ce134af 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -48,10 +48,26 @@ zstyle ':vcs_info:*' formats '%F{cyan}(%F{red}%b%F{cyan})%f %c%u' compinit -d "$XDG_CACHE_HOME/zsh/zcompdump" zstyle ':completion::complete:*' use-cache 1 zstyle ':completion::complete:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache" +zstyle ':completion:*:options' auto-description '%d' +zstyle ':completion:*:default' list-colors '' +zstyle ':completion:*:default' list-prompt '' zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' -zstyle ':completion:*' list-colors '' zstyle ':completion:*' menu select +zstyle ':completion:*' group-name '' +zstyle ':completion:*' list-dirs-first true +zstyle ':completion:*' verbose yes +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +zstyle ':completion:*:matches' group 'yes' +zstyle ':completion:*:options' description 'yes' + +# Completion formatting +zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' + # Bind keys zle -N history-beginning-search-backward-end history-search-end zle -N history-beginning-search-forward-end history-search-end