From b173beaa724f26cff99b79330d83954a8e4729b6 Mon Sep 17 00:00:00 2001 From: yuri-rage Date: Tue, 8 Jul 2014 01:02:39 +0300 Subject: [PATCH] case insensitive substring completion --- lib/completion.zsh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index fa1d97f48..bc24e9082 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -15,7 +15,17 @@ if [ "x$CASE_SENSITIVE" = "xtrue" ]; then zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' unset CASE_SENSITIVE else - zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + # in order try: + # simple tab completion + # case insensitive completion + # simple substring completion + # case insensitive substring completion + # by defining multiple patterns, completion performance remains fast + # while still affording tons of flexibility + zstyle ':completion:*' matcher-list '' 'm:{A-ZÄÖÜa-zäöü}={a-zäöüA-ZÄÖÜ}' \ + 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' \ + 'm:{A-ZÄÖÜa-zäöü}={a-zäöüA-ZÄÖÜ} r:|[._-]=* r:|=*' \ + 'm:{A-ZÄÖÜa-zäöü}={a-zäöüA-ZÄÖÜ} l:|=* r:|=*' fi zstyle ':completion:*' list-colors ''