# completion types
zstyle ':completion:*' completer _extensions _complete

# jump directly to first completion
zstyle ':completion:::::default' menu yes select

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

# allow highlight/menu move in completions
zstyle ':completion:*' menu select

# styles
zstyle ':completion:*:*:*:*:descriptions' format '%F{green}// %d%f'
zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}// %d%f'
zstyle ':completion:*:messages' format '%F{purple}// %d%f'
zstyle ':completion:*:warnings' format '%F{red}// no completions availible%f'

# group results under headers
zstyle ':completion:*' group-name ''
zstyle ':completion:*:*:-command-:*:*' group-order alias builtins functions commands

# file colors
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}

# use --help completions when availible
compdef _gnu_generic -default- -P '*'
