zsh: completion: only accept one mistake per 1 characters
This commit is contained in:
parent
9254a6137d
commit
3de8370545
1 changed files with 9 additions and 8 deletions
|
|
@ -50,17 +50,21 @@ zstyle ':completion:::::' completer \
|
|||
_force_rehash _expand _complete _prefix _ignored _approximate
|
||||
#TODO: keep _prefix or not?
|
||||
|
||||
# ignore case when trying to match typed characters
|
||||
zstyle ':completion:*:(^approximate):*' matcher-list 'm:{a-z}={A-Z}'
|
||||
|
||||
# allow one mistake per three characters
|
||||
zstyle -e ':completion:*:approximate:*' max-errors \
|
||||
'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )'
|
||||
|
||||
# ===== completion appearance
|
||||
# use ls colors for completion
|
||||
# Fallback to built in ls colors
|
||||
#zstyle ':completion:*' list-colors ''
|
||||
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
|
||||
|
||||
# Make the list prompt friendly
|
||||
zstyle ':completion:*' 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
|
||||
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
|
||||
zstyle ':completion:*:default' select-prompt '%SScrolling active: current selection at %p%s'
|
||||
|
||||
# Add simple colors to kill
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
|
|
@ -70,9 +74,6 @@ zstyle ':completion:*' menu select=1 _complete _ignored _approximate
|
|||
# insert all expansions for expand completer
|
||||
# zstyle ':completion:*:expand:*' tag-order all-expansions
|
||||
|
||||
# match uppercase from lowercase
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
||||
|
||||
# offer indexes before parameters in subscripts
|
||||
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue