diff --git a/zsh/completion.zsh b/zsh/completion.zsh index c1f9be7..3259680 100644 --- a/zsh/completion.zsh +++ b/zsh/completion.zsh @@ -62,29 +62,37 @@ zstyle -e ':completion:*:approximate:*' max-errors \ zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}" # 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 for more, or the character to insert%s' # Make the selection prompt friendly when there are a lot of choices 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 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 # zstyle ':completion:*:expand:*' tag-order all-expansions # offer indexes before parameters in subscripts 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) zstyle ':completion:*:functions' ignored-patterns '_*' zstyle ':completion:*:scp:*' tag-order files users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *'