Initial zsh setup

This commit is contained in:
outfoxxed 2023-06-28 00:07:07 -07:00
parent 368bf1f1f3
commit 37e8506352
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
4 changed files with 109 additions and 0 deletions

27
modules/zsh/completion.zsh Executable file
View file

@ -0,0 +1,27 @@
# 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 '*'