about summary refs log tree commit diff
path: root/.config/zsh/completion.zsh
blob: 0914ea2016d65640371054f202d987df0b90a5ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# completions
setopt complete_in_word   # complete both ends of words
setopt always_to_end      # and move cursor to the end afterward
setopt auto_menu          # <tab><tab> brings up the menu ...
setopt no_menu_complete   # ... and does not select the first option
setopt auto_param_slash   # convenience: add trailing / after directories
setopt no_case_glob
setopt no_flow_control
# complete . and ..
zstyle ':completion:*' special-dirs true
# complete the middle of words e.g. lc -> pluralcafe
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
# cache completions
zstyle ':completion::complete:*' use-cache yes
zstyle ':completion::complete:*' cache-path "$HOME/.zcompcache"
# group names (e.g. separate cdpath from current directory)
# <https://superuser.com/a/286713>
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format %B%d%b
# enable completions
autoload -Uz compinit && compinit