Lazy load rbenv

This commit is contained in:
2018-07-19 22:33:58 +01:00
parent 938e108917
commit 4dc4fd0110

View File

@@ -47,10 +47,16 @@ if [ -n "$BASH_VERSION" ]; then
alias bcn="bundle clean"
fi
if [ -n "$(command -v rbenv)" ]; then
eval "$(rbenv init --no-rehash -)"
# lazy-load rbenv
if [ -d "$HOME/.rbenv/shims" ]; then
path_prepend "$HOME/.rbenv/shims"
fi
rbenv() {
eval "$(command rbenv init -)"
rbenv "$@"
}
# lunchy auto-completion
if [ -n "$BASH_VERSION" ]; then
if which gem &> /dev/null && gem which lunchy &> /dev/null; then