File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,10 +7,22 @@ zstyle ':completion:*' completer _expand _complete _match _approximate
77# Approximate (typo-tolerant) matching: allow 1 error per 3 chars of the word,
88# so short words (e.g. command names) stay strict and huge candidate sets don't blow up.
99zstyle ' :completion:*:approximate:*' max-errors ' reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) numeric )'
10- # Ignore case.
11- zstyle ' :completion:*' matcher-list ' ' ' m:{a-z}={A-Z}' ' +m:{A-Z}={a-z}'
10+ # Staged matching: exact -> case-insensitive -> partial-after-separator -> substring.
11+ # Tries each rule in order, only loosening when the previous yields no matches.
12+ zstyle ' :completion:*' matcher-list \
13+ ' ' \
14+ ' m:{a-zA-Z}={A-Za-z}' \
15+ ' r:|[._-]=* r:|=*' \
16+ ' l:|=* r:|=*'
1217# Verbose output for completion listing.
1318zstyle ' :completion:*' verbose yes
19+ # Colorize the completion list using LS_COLORS (set in 30_colors.zsh via vivid).
20+ zstyle ' :completion:*' list-colors ${(s.: .)LS_COLORS}
21+ zstyle ' :completion:*:default' list-colors ${(s.: .)LS_COLORS}
22+ # Colored, labelled group headings / messages in the completion listing.
23+ zstyle ' :completion:*:descriptions' format ' %F{yellow}-- %d --%f'
24+ zstyle ' :completion:*:messages' format ' %F{cyan}-- %d --%f'
25+ zstyle ' :completion:*:warnings' format ' %F{red}-- no matches --%f'
1426# All different types of matches displayed separately.
1527zstyle ' :completion:*' group-name ' '
1628# Make the completion menu selectable.
You can’t perform that action at this time.
0 commit comments