Zsh: Add approximate completion
This commit is contained in:
parent
e94b9fd237
commit
66897bdbdc
|
@ -13,14 +13,15 @@ setopt AUTO_LIST # Automatically list choices on ambiguous completion.
|
|||
setopt AUTO_PARAM_SLASH # If completed parameter is a directory, add a trailing slash.
|
||||
unsetopt MENU_COMPLETE # Do not autoselect the first completion entry.
|
||||
unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.
|
||||
unsetopt CASE_GLOB
|
||||
|
||||
# Use caching to make completion for commands such as dpkg and apt usable.
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "${ZDOTDIR:-$HOME}/.zcompcache"
|
||||
zstyle ':completion::complete:*' cache-path "${ZDOTDIR:-$HOME}/.zgen/.zcompcache"
|
||||
|
||||
# Case-insensitive (all), partial-word, and then substring completion.
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
unsetopt CASE_GLOB
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z\-}={A-Za-z\_}' #'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*' matcher-list 'r:[[:ascii:]]||[[:ascii:]]=** r:|=* m:{a-z\-}={A-Z\_}'
|
||||
|
||||
# Group matches and describe.
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
|
|
Loading…
Reference in a new issue