From b22a99292e75185042beff536071d342370ce2c8 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 17 Jan 2017 09:23:38 -0500 Subject: [PATCH] Be a bit faster loading rbenv/nodenv --- zshrc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index c8896d6..29dd2a7 100644 --- a/zshrc +++ b/zshrc @@ -28,13 +28,15 @@ zle -N insert-sudo bindkey "^z" insert-sudo # init rbenv -if test -d "$HOME/.rbenv"; then - eval "$(rbenv init -)" +if which rbenv > /dev/null; then + eval "$(rbenv init --no-rehash -)" + (rbenv rehash &) 2> /dev/null fi # init nodenv if which nodenv > /dev/null; then - eval "$(nodenv init -)"; + eval "$(nodenv init --no-rehash -)" + (nodenv rehash &) 2> /dev/null fi # completion