From: Simon Ruderich Date: Sun, 23 Nov 2008 23:27:51 +0000 (+0100) Subject: Improved zsh's completion. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=ea83a5064cd887af82ffafe8767fcfb5682a371f;p=config%2Fdotfiles.git Improved zsh's completion. --- diff --git a/zsh/rc b/zsh/rc index 15e3911..fb37a6a 100644 --- a/zsh/rc +++ b/zsh/rc @@ -60,8 +60,9 @@ bindkey "^I" expand-or-complete-prefix # Use cache to speed up completions. zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path ~/.zsh/cache -# Ignore case if currently typed string doesn't match. -zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' +# Try uppercase if the currently typed string doesn't match. This allows +# typing in lowercase most of the time and completion fixes the case. +zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' # Ignore completion functions. zstyle ':completion:*:functions' ignored-patterns '_*' # Ignore parent directory. @@ -71,6 +72,11 @@ zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} # Make completion lists scrollable so "do you wish to see all n possibilities" # is no longer displayed. zstyle ':completion:*' list-prompt '%p' +# When unsetting variables make sure every variable name is only suggested +# once. +zstyle ':completion:*:unset:*' ignore-line yes +# When working with mercurial don't complete the same file multiple times. +zstyle ':completion:*:hg*:*' ignore-line yes # Enable zsh's extended glob abilities. setopt extendedglob