Deferring rbenv init until we need it

since it appears to be the shell init hog.
This commit is contained in:
Dan Buch
2013-01-19 23:45:51 -05:00
parent bc0fc62b2f
commit 1bce27ce8b
3 changed files with 13 additions and 9 deletions

View File

@@ -154,6 +154,17 @@ function precmd(){
}
function unhyphenate(){
function unhyphenate() {
ruby -e "puts '$1'.gsub(/[\-_]/, ' ')"
}
function rbenv_init() {
if [ -n "$DEBUG" ] ; then
export RBENV_DEBUG=1
time eval "$(rbenv init -)"
unset RBENV_DEBUG
else
eval "$(rbenv init -)"
fi
}