~tardypad/dotfiles

ref: 6c6da645bdf106f6cb251579c4eb42cbb0a19e8d dotfiles/files/configs/zsh/config.d/completion.zsh -rw-r--r-- 965 bytes
6c6da645 — Damien Tardy-Panis Remove unused _operands function in _time-tracker completion 9 months ago
                                                                                
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
# register local completions folders
fpath=(
  "${HOME}/.zsh/completions"/**/
  $fpath
)

autoload -Uz compinit

# skip security checks on completion permissions for when switching to root
compinit -u

# enable selection of item via menu
zstyle ':completion:*' menu select

# reuse LS_COLORS for items color
# and define current item colors
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} 'ma={color/base00/fg};{color/current_item/bg}'

# color options description
zstyle ':completion:*:options' list-colors '=-- *={color/base08/fg}'

# case insensitive completion
zstyle ':completion:*' matcher-list 'm:{a-zA-z}={A-Za-z}'

# Disable hosts completion for ssh and scp
# from /etc/hosts and ~/.ssh/known_hosts
# so that completion only reads aliases from ~/.ssh/config
zstyle -e ':completion:*:*:(scp|ssh):*:*' hosts 'reply=()'
zstyle -e ':completion:*:*:(scp|ssh):*:*' known-hosts-files 'reply=()'

# same completions
compdef goto-project=project-path