From: Simon Ruderich Date: Tue, 9 Sep 2008 15:15:40 +0000 (+0200) Subject: Zsh completion additions. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=5ea973b09ff96ec4aa4d8c6bf6c71f8e02edf72c;p=config%2Fdotfiles.git Zsh completion additions. Expanding inside a string works now, completion functions are ignored by completions and the parent directory is ignored when using cd, mv and cp. --- diff --git a/zsh/rc b/zsh/rc index 088c53d..821d8d9 100644 --- a/zsh/rc +++ b/zsh/rc @@ -45,11 +45,18 @@ autoload -U compinit && compinit # Make sure the list of possible completions is displayed after pressing # the first time. setopt nolistambiguous +# Allow completions in the middle of a text, i.e. "/usr/bin/whatever" +# completes like "/usr/bin/". Useful when adding new options to commands. +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}' +# Ignore completion functions. +zstyle ':completion:*:functions' ignored-patterns '_*' +# Ignore parent directory. +zstyle ':completion:*:(cd|mv|cp):*' ignore-parents parent pwd # Enable zsh's extended glob abilities. setopt extendedglob