[completion] Ask when completion list is long
To achieve this, we have to make sure than the following is not set: * `zstyle ':completion:*:default' list-prompt '...'` otherwise long completion lists will be paginated (without prompting). Remove options being set that are already the default. And remove the space character from the beginning of the messages. Fixes #136
This commit is contained in:
parent
20f16e4df3
commit
1779321e7a
1 changed files with 8 additions and 19 deletions
|
@ -30,22 +30,12 @@ source ${0:h}/compdefs.zsh
|
|||
# the cursor is moved to the end of the word
|
||||
setopt ALWAYS_TO_END
|
||||
|
||||
# Automatically use menu completion after the second consecutive request for completion
|
||||
setopt AUTO_MENU
|
||||
|
||||
# Automatically list choices on an ambiguous completion.
|
||||
setopt AUTO_LIST
|
||||
|
||||
# Perform a path search even on command names with slashes in them.
|
||||
setopt PATH_DIRS
|
||||
|
||||
# Make globbing (filename generation) sensitive to case.
|
||||
# Make globbing (filename generation) not sensitive to case.
|
||||
unsetopt CASE_GLOB
|
||||
|
||||
# On an ambiguous completion, instead of listing possibilities or beeping, insert the first match immediately.
|
||||
# Then when completion is requested again, remove the first match and insert the second match, etc.
|
||||
unsetopt MENU_COMPLETE
|
||||
|
||||
|
||||
#
|
||||
# completion module options
|
||||
|
@ -53,15 +43,14 @@ unsetopt MENU_COMPLETE
|
|||
|
||||
# group matches and describe.
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
zstyle ':completion:*:matches' group 'yes'
|
||||
zstyle ':completion:*:options' description 'yes'
|
||||
zstyle ':completion:*:matches' group yes
|
||||
zstyle ':completion:*:options' description yes
|
||||
zstyle ':completion:*:options' auto-description '%d'
|
||||
zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f'
|
||||
zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f'
|
||||
zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
|
||||
zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
|
||||
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
||||
zstyle ':completion:*' format ' %F{yellow}-- %d --%f'
|
||||
zstyle ':completion:*:corrections' format '%F{green}-- %d (errors: %e) --%f'
|
||||
zstyle ':completion:*:descriptions' format '%F{yellow}-- %d --%f'
|
||||
zstyle ':completion:*:messages' format '%F{purple}-- %d --%f'
|
||||
zstyle ':completion:*:warnings' format '%F{red}-- no matches found --%f'
|
||||
zstyle ':completion:*' format '%F{yellow}-- %d --%f'
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
|
|
Loading…
Reference in a new issue