Tuesday, October 2, 2012

zsh cd tab completion slow

It is quite annoing that zsh seems stuck when completion using tab in a huge directory.

To speed up the zsh completion, append the following lines to ~/.zshrc

# Speed up the zsh completion

zstyle ':completion:*' accept-exact '*(N)'
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache


Sometimes, the directory auto completion works slow under git and svn directories.The solution is to disable it from getting git info and svn info:

For GIT, add following to .zshrc:


__git_files () {
    _wanted files expl 'local files' _files  
}


For SVN, append this line to .zshrc:

compdef -d svn

1 comment:

  1. CasinoSecret | Play at the Best Online Casinos!
    CasinoSecret is the first Bitcoin & Ethereum casino to be integrated 12bet into the crypto カジノ シークレット gambling scene. Players 우리카지노 쿠폰 can now enjoy a range of games

    ReplyDelete