rbenv: `rbenv init` don't rehash by default

The current rbenv init command rehashes on each run, unless --no-rehash is specified. Given that I already need to manually rehash when installing a new gem with a cli, etc, I don’t think it’s advantageous to rehash each time the shell is loaded.

What do you think of reversing this behavior:

  • Default Behavior: don’t rehash with rbenv init
  • --rehash flag: call the rehash command

In other words:

# old                              # new
eval "$(rbenv init - --no-rehash)" #=> eval "$(rbenv init)"
eval "$(rbenv init -)"             #=> eval "$(rbenv init --rehash)"

This is the opposite of the current behavior, but I think this is more sensible.

If you’re on board, I’ll do the PR, but I didn’t want to make too bold of a change without consulting you guys first.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments