From: Samir Benmendil Date: Fri, 4 Sep 2015 15:52:23 +0000 (+0100) Subject: zsh: "smartcase" completion X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/c5b613086ff0e5e6d749cf0cf6d6b13cbda81cca zsh: "smartcase" completion It's not quite smartcase as known from vim. It will respect all typed uppercase letters but may accept uppercase matches on lowercase letters. --- diff --git a/zsh/lib/completion.zsh b/zsh/lib/completion.zsh index 5e85286..98abc2b 100644 --- a/zsh/lib/completion.zsh +++ b/zsh/lib/completion.zsh @@ -8,14 +8,7 @@ WORDCHARS='' zmodload -i zsh/complist -CASE_SENSITIVE='true' -# case-(in)sensitive (all),partial-word and then substring completion -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:|=*' -fi +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' zstyle ':completion:*' list-colors ''