From: Simon Ruderich Date: Tue, 28 Aug 2012 17:12:28 +0000 (+0200) Subject: zsh/rc: Improve documentation for matcher-list. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=4aef84aaeeba30f2244474da9bf235f4ff46e86f;p=config%2Fdotfiles.git zsh/rc: Improve documentation for matcher-list. --- diff --git a/zsh/rc b/zsh/rc index 779d0dd..ca12596 100644 --- a/zsh/rc +++ b/zsh/rc @@ -509,10 +509,20 @@ setopt completeinword zstyle ':completion:::::' completer \ _expand _complete _prefix _ignored _approximate -# Try uppercase if the currently typed string doesn't match. This allows -# typing in lowercase most of the time and completion fixes the case. Don't -# perform these fixes in _approximate to prevent it from changing the input -# too much. Thanks to the book "From Bash to Z Shell" page 249. +# Match specification to be tried when completing items. Each group ('...') is +# tried after another if no matches were found, once matches are found no +# other groups are tried. Thanks to Mikachu in #zsh on Freenode (2012-08-28 +# 18:48 CEST) for explanations. +# +# When matching also include the uppercase variant of typed characters +# ('m:{a-z}={A-Z}'); using '' before this group would try the unmodified match +# first, but I prefer to get all matches immediately (e.g. if Makefile and +# makefile exist in the current directory echo m matches both, with '' it +# would only match makefile because it found one match). This allows typing in +# lowercase most of the time and completion fixes the case, which is faster. +# +# Don't perform these fixes in _approximate to prevent it from changing the +# input too much. Thanks to the book "From Bash to Z Shell" page 249. zstyle ':completion:*:(^approximate):*' matcher-list 'm:{a-z}={A-Z}' # Allow one mistake per three characters. Thanks to the book "From Bash to Z