-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zstyle
26 lines (19 loc) · 1008 Bytes
/
.zstyle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Speed up autocompletion with prefix-only matching.
zstyle ':completion:*' accept-exact '*(N)'
# Speed up autocompletion with caching.
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache
# Fuzzy match mistyped completions.
zstyle ':completion:*' completer _complete _match _approximate
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric
# Increase the number of errors based on the length of the typed word.
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'
# Ignore completion functions for non-existent commands.
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
# Color partial tab completions.
#
# @see: https://stackoverflow.com/a/16149200
zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)*==34=34}:${(s.:.)LS_COLORS}")';
# Treat consecutive slashes as a single slash.
zstyle ':completion:*' squeeze-slashes true