Permalink
Browse files

Do not rehash on rbenv initialization

We install rbenv-gem-rehash, which will automatically rehash when you
install new binaries, so I can't conceive of why this is necessary. I've been
using --no-rehash for months now without issue, and there's a noticeable speed
up in shell initialization.
  • Loading branch information...
1 parent bede758 commit 01ee2241c74bc846dd0c921d0a7f203ef611557f @derekprior derekprior committed Nov 1, 2013
Showing with 4 additions and 4 deletions.
  1. +1 −1 linux
  2. +1 −1 linux-components/rbenv
  3. +1 −1 mac
  4. +1 −1 mac-components/rbenv
View
2 linux
@@ -93,7 +93,7 @@ fancy_echo "Installing rbenv, to change Ruby versions ..."
if ! grep -qs "rbenv init" ~/.zshrc; then
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
- echo 'eval "$(rbenv init -)"' >> ~/.zshrc
+ echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
fi
source ~/.zshrc
View
@@ -4,7 +4,7 @@ fancy_echo "Installing rbenv, to change Ruby versions ..."
if ! grep -qs "rbenv init" ~/.zshrc; then
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
- echo 'eval "$(rbenv init -)"' >> ~/.zshrc
+ echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
fi
source ~/.zshrc
View
2 mac
@@ -83,7 +83,7 @@ fancy_echo "Installing rbenv, to change Ruby versions ..."
brew install rbenv
if ! grep -qs "rbenv init" ~/.zshrc; then
- echo 'eval "$(rbenv init -)"' >> ~/.zshrc
+ echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
fancy_echo "Enable shims and autocompletion ..."
eval "$(rbenv init -)"
View
@@ -2,7 +2,7 @@ fancy_echo "Installing rbenv, to change Ruby versions ..."
brew install rbenv
if ! grep -qs "rbenv init" ~/.zshrc; then
- echo 'eval "$(rbenv init -)"' >> ~/.zshrc
+ echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
fancy_echo "Enable shims and autocompletion ..."
eval "$(rbenv init -)"

0 comments on commit 01ee224

Please sign in to comment.