postmodern / chruby

Changes the current Ruby
MIT License
2.87k stars 190 forks source link

Properly handle setting and reverting to a default Ruby #385

Open postmodern opened 7 years ago

postmodern commented 7 years ago

We need a better way to set and revert to a "default" selected Ruby. Simply adding chruby ... to one's .bashrc does not take effect after chruby_auto resets the current Ruby.

postmodern commented 7 years ago

See the chruby_default branch.

postmodern commented 7 years ago

Some thoughts from @havenwood in IRC.

  1. Should we use an agnostic variable name to promote compatibility? RUBY_DEFAULT_VERSION instead of CHRUBY_DEFAULT?
  2. Should we store the default version in a config file (ex: ~/.config/chruby/default)? So the default version can be set once and be picked up by all shells.