From 6de94b87fe2138aba123e5fe4529a749f825eee6 Mon Sep 17 00:00:00 2001 From: huyz Date: Wed, 12 Dec 2012 02:38:27 -0800 Subject: [PATCH] Add option to disable git's smart but slow file completion --- runcoms/zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runcoms/zshrc b/runcoms/zshrc index 4337a64e..d3fb5cef 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -15,3 +15,11 @@ fi # huy: display non-success exit value for every command # This cannot be put in a module as it's always scoped to the enclosing function setopt printexitvalue + +# Speed up git if requested by user +if ! zstyle -b ':huy:system' git-smart-file-complete 'dummy'; then + # http://talkings.org/post/5236392664/zsh-and-slow-git-completion + __git_files () { + _wanted files expl 'local files' _files + } +fi