Skip to content

Commit

Permalink
config(zsh): improve zstyle completion settings
Browse files Browse the repository at this point in the history
  • Loading branch information
haunt98 committed Oct 21, 2024
1 parent 27c2484 commit ca47de3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions data/zsh/bottom-zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ca47de3

Please sign in to comment.