# -*- mode: shell-script -*-
# vim: set ft=zsh :

zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:kill:*' menu yes select
zstyle ':completion:*:kill:*' force-list always
zstyle ':completion:*:kill:*:processes' list-colors "=(#b) #([0-9]#)*=$color[cyan]=$color[red]"
#zstyle ':completion:*:kill:*:jobs' list-colors "=(#b)?([0-9]#)*=$color[cyan]=$color[red]"
zstyle ':completion:*:processes' command 'ps x -o pid,pcpu,tt,args'
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' menu select
zstyle ':completion:*' verbose yes
zstyle ':completion:*' completer _expand _complete _ignored _approximate    # stolen from tadzik
#setopt correctall

zstyle ':completion:*' format '%B%UCompleting %d%u%b'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-dirs-first true
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # stolen from Diabelko

zstyle ':completion:*' ignore-parents parent pwd

zstyle ':completion:*:manuals.*'    insert-sections   true
zstyle ':completion:*:manuals'      separate-sections true

compdef '_wanted devices expl devices compadd -- /dev/sd*(%N)' amount

# Source: https://chneukirchen.org/blog/archive/2011/02/10-more-zsh-tricks-you-may-not-know.html
# Force file name completion on Shift-TAB.
zle -C complete-files menu-complete _generic
zstyle ':completion:complete-files:*' completer _files
bindkey '\e[Z' complete-files
zmodload zsh/complist
bindkey -M menuselect -s '\e[Z' '^I'
