summaryrefslogtreecommitdiff
path: root/.config/zsh/completion.zsh
blob: f0503512a5ff2d27678e82db2b728be259e6a864 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ZLE_SPACE_SUFFIX_CHARS=$'|&'

# command-not-found
[[ -r /usr/share/zsh/plugins/pkgfile/command-not-found.zsh ]] &&
	source /usr/share/zsh/plugins/pkgfile/command-not-found.zsh

# UI
zstyle ':completion:*' menu select
#zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}

# alias completion
setopt complete_aliases

# privilege completion
zstyle ':completion::complete:*' gain-privileges 1

# cache
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.cache/zsh/completion

# matching
zstyle ':completion:*' matcher-list \
	'm:{a-zA-Z}={A-Za-z}' \
	'r:|=*' \
	'l:|=*'

setopt complete_in_word
setopt auto_cd

# ignore junk
zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS'
zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS'

# process completion
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:processes' command 'ps -eo pid,user,comm --sort=-%mem'

# misc
zstyle ':completion:*' squeeze-slashes true
zstyle ':completion:*:cd:*' ignore-parents parent pwd
zstyle ':completion:*' rehash false

# init
autoload -Uz compinit
compinit -C -d ~/.cache/zsh/zcompdump