From ca47de3d7d54ba885a212c9d4e73cb666097fb84 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Mon, 21 Oct 2024 23:15:20 +0700 Subject: [PATCH] config(zsh): improve zstyle completion settings --- data/zsh/bottom-zshrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/data/zsh/bottom-zshrc b/data/zsh/bottom-zshrc index ad96900..8c2bd2a 100644 --- a/data/zsh/bottom-zshrc +++ b/data/zsh/bottom-zshrc @@ -14,8 +14,13 @@ export XDG_CONFIG_HOME=~/.config export XDG_CACHE_HOME=~/.cache export XDG_DATA_HOME=~/.local/share -# https://www.topbug.net/blog/2016/09/27/make-gnu-less-more-powerful/ -export LESS="-RF -i -K -s -x2 --wordwrap" +# https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/completion.zsh +# https://thevaluable.dev/zsh-completion-guide-examples/ +# https://damn.engineer/2022/09/28/zsh-case-insensitive +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache" +zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|=*' 'l:|=* r:|=*' +zstyle ':completion:*' special-dirs true # zsh plugins # https://github.com/zsh-users/zsh-syntax-highlighting @@ -49,6 +54,9 @@ if [[ -f /opt/homebrew/share/zsh-history-substring-search/zsh-history-substring- export HISTORY_SUBSTRING_SEARCH_PREFIXED=true fi +# https://www.topbug.net/blog/2016/09/27/make-gnu-less-more-powerful/ +export LESS="-RF -i -K -s -x2 --wordwrap" + # git # https://stackoverflow.com/a/43747486 export GIT_COMPLETION_CHECKOUT_NO_GUESS=1