postmodern / chruby

Changes the current Ruby
MIT License
2.88k stars 189 forks source link

move ruby discovery code into a function #493

Open kbrock opened 1 year ago

kbrock commented 1 year ago

When you install a new ruby in a different terminal shell, chruby does not pick up on the new ruby version.

The solution is to to source chruby.sh again. Introducing chruby_discover which will allow any shell to pick up on the new ruby versions


Yes, I was trying to "optimize" this functionality in #492 - but this PR is not an optimization play.

I have had this function defined in my bashrc for a while and thought others may want it as well.

postmodern commented 1 year ago

Since you're adding a new function, I would technically need to merge this into the 0.4.0 branch.

kbrock commented 1 year ago

Fixed. Thanks for the feedback. I forgot all about tabs.

It is ok if you don't want to go this route and bump the major version. If you like this route, do you need me to add documentation or changelog or anything?