zsh: completion: make appearance more verbose and rearrange config

This commit is contained in:
Thomas Preisner 2017-07-15 22:18:35 +02:00
parent 3de8370545
commit f8be2045f4

View file

@ -62,29 +62,37 @@ zstyle -e ':completion:*:approximate:*' max-errors \
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}" zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
# Make the list prompt friendly # Make the list prompt friendly
zstyle ':completion:*:default' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s' zstyle ':completion:*:default' list-prompt '%SAt %p: Hit <TAB> for more, or the character to insert%s'
# Make the selection prompt friendly when there are a lot of choices # Make the selection prompt friendly when there are a lot of choices
zstyle ':completion:*:default' select-prompt '%SScrolling active: current selection at %p%s' zstyle ':completion:*:default' select-prompt '%SScrolling active: current selection at %p%s'
# Display group (category) name (%d) (like 'external command', 'alias', etc.) in
# bold. Also display a message if _approximate found errors and no matches
# were found.
zstyle ':completion:*' format ' %B%d%b:'
zstyle ':completion:*:corrections' format ' %B%d%b (errors: %e)'
zstyle ':completion:*:warnings' format ' %BNo matches for: %d%b'
# display matches sorted into categories
zstyle ':completion:*' group-name ''
# always show menu and preselect the first option
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
#TODO: keep?
# make completion functions use the verbose style and form
#zstyle ':completion:*' verbose yes
# ===== completion commands
# Add simple colors to kill # Add simple colors to kill
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
# insert all expansions for expand completer # insert all expansions for expand completer
# zstyle ':completion:*:expand:*' tag-order all-expansions # zstyle ':completion:*:expand:*' tag-order all-expansions
# offer indexes before parameters in subscripts # offer indexes before parameters in subscripts
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
# formatting and messages
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''
# ignore completion functions (until the _ignored completer) # ignore completion functions (until the _ignored completer)
zstyle ':completion:*:functions' ignored-patterns '_*' zstyle ':completion:*:functions' ignored-patterns '_*'
zstyle ':completion:*:scp:*' tag-order files users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *' zstyle ':completion:*:scp:*' tag-order files users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *'