Permalink
Browse files

Add --no-rehash option to rbenv-init (#170)

  • Loading branch information...
1 parent cd2094f commit ee5ad02d42690f572d4a89386e84e6b3c04df054 @sstephenson sstephenson committed Dec 26, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 libexec/rbenv-init
View
@@ -8,6 +8,12 @@ if [ "$1" = "-" ]; then
shift
fi
+no_rehash=""
+if [ "$1" = "--no-rehash" ]; then
+ no_rehash=1
+ shift
+fi
+
shell="$1"
if [ -z "$shell" ]; then
shell="$(basename "$SHELL")"
@@ -69,7 +75,9 @@ bash | zsh )
;;
esac
-echo 'rbenv rehash 2>/dev/null'
+if [ -z "$no_rehash" ]; then
+ echo 'rbenv rehash 2>/dev/null'
+fi
commands=(`rbenv commands --sh`)
IFS="|"

0 comments on commit ee5ad02

Please sign in to comment.