I am using Zsh version: 4.3.11 with the oh-my-zsh framework.

When coupled with "oh-my-zsh", Zsh will attempt to autocomplete SVN (and Git for that matter) commands when the TAB key is pressed during a command. Since it obviously does some parsing-magic behind the curtains, autocompleting SVN commands in a huge repository introduces a significant delay.

svn add a[TAB]
* ~2-3 second delay *
svn add apps/

This is driving me to the edge, and after a couple of months with nothing but praise left over for Zsh, I have temporarily reverted to Bash, as being unable to use the shell in one specific repository is just ridiculous.

There are two additional factors here, and although I'm unsure of their significance, I'll list them anyways:

  • This is done over SSH
  • Normal filename-autocompletion is completely instant. Only filename-autocompletion during SVN commands is laggy.

I'm pretty sure, that is not the nice way, but you can overwrite the svncompletion with

compdef '_files -g "*"' svn

After that, zsh will only offer files

% svn     
tags in context :completion::complete:svn::
    globbed-files  (_files)

instead of the dedicated and time consuming _svn completions:

% svn 
tags in context :completion::complete:svn::
    argument-1 options  (_arguments _svn _subversion)
tags in context :completion::complete:svn:argument-1:
    commands  (_svn _subversion)
| improve this answer | |
  • I'll give this a shot. I have tried various compdef settings so far without luck, but not this one. :) Gonna check it out when I get to work tomorrow. Thanks! – krystah Dec 18 '13 at 19:11
  • This completely did the trick. The only itch from using Zsh is hereby eliminated, thanks a load :) – krystah Dec 23 '13 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.