From 238e0d794bab133abb6dfefb82aee4d6e3d02003 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 15 Jun 2018 13:36:17 -0300 Subject: Speed up zsh completion --- zshrc.dot.link | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zshrc.dot.link b/zshrc.dot.link index 4c7da7c..5444184 100644 --- a/zshrc.dot.link +++ b/zshrc.dot.link @@ -30,6 +30,7 @@ compinit setopt auto_cd # Completion config +zstyle ':completion:*' accept-exact '*(N)' zstyle ':completion:*' auto-description 'specify: %d' zstyle ':completion:*' completer _expand _complete _correct _approximate zstyle ':completion:*' format 'Completing %d' @@ -50,6 +51,17 @@ zstyle ':completion:*:descriptions' format %d zstyle ':completion:*:descriptions' format %B%d%b zstyle ':completion:*:complete:(cd|pushd):*' tag-order 'local-directories named-directories path-directories' +# Speeding up zsh completion +# http://lethalman.blogspot.com/2009/10/speeding-up-zsh-completion.html +#zstyle ':completion:*' use-cache on +#zstyle ':completion:*' cache-path ~/.zsh/cache + +# Git completion +# https://stackoverflow.com/questions/9810327/zsh-auto-completion-for-git-takes-significant-amount-of-time-can-i-turn-it-off/9810485#9810485 +__git_files () { + _wanted files expl 'local files' _files +} + # Powerline if [ "$TERM" != "linux" ] && [ -e '/usr/share/powerline/bindings/zsh/powerline.zsh' ]; then . /usr/share/powerline/bindings/zsh/powerline.zsh -- cgit v1.2.3