Skip to content

Instantly share code, notes, and snippets.

@niyaton
Created August 19, 2013 04:29
Show Gist options
  • Save niyaton/6265778 to your computer and use it in GitHub Desktop.
Save niyaton/6265778 to your computer and use it in GitHub Desktop.
eval (rbenv init -) とか重いんですよ.
# Initialize rbenv.
# "eval rbenv init -" is much heavy. use cached script.
if [ -n "$(printenv TMUX)" ]; then
source $ZSHHOME/rbenv.init-no-rehash
else
source $ZSHHOME/rbenv.init
fi
check_rbenv_init() {
rbenv init - | diff - $ZSHHOME/rbenv.init
rbenv init - --no-rehash | diff - $ZSHHOME/rbenv.init-no-rehash
}
update_rbenv_init() {
rbenv init - > $ZSHHOME/rbenv.init
rbenv init - --no-rehash > $ZSHHOME/rbenv.init-no-rehash
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment