Skip to content

Commit b401047

Browse files
committed
Make zsh startup 100ms faster by tuning rbenv
This changes the behaviour of the rbenv initialization by skipping the `rbenv rehash` call hidden behind `rbenv init`. The downside to this is that rbenv won't rehash automatically when starting a new shell instance. Which means that installing a new Ruby version needs a manual `rbenv rehash`. This is taken from here: http://kleinmann.org/2015/01/18/decreasing-my-zsh-startup-time/
1 parent d05766f commit b401047

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎zshrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export PATH="/usr/local/bin:$PATH"
302302
#
303303
if which rbenv &> /dev/null; then
304304
export PATH="$HOME/.rbenv/bin:$PATH"
305-
eval "$(rbenv init -)"
305+
eval "$(rbenv init - --no-rehash)"
306306
fi
307307

308308
# Encoding problems with gem

0 commit comments

Comments
 (0)