From ea83a5064cd887af82ffafe8767fcfb5682a371f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 24 Nov 2008 00:27:51 +0100 Subject: [PATCH] Improved zsh's completion. --- zsh/rc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.45.2