Postmodern

Results 523 comments of Postmodern

Long ago chruby used to use `precmd_functions` (issue #40), but those do not execute when in non-interactive mode (ex: `zsh -c "cd path/to/file && ruby ..."`). Thus I switched to...

@sobrinho note that `chruby_auto` also has to catch multiple `cd`s in non-interactive mode (as well as when a `.ruby-version` file is created by the previous command), such as when running...

@kwstannard only problem with that, which has been discussed in-depth, is when the ruby is installed outside of the user's home (such as in `/opt/rubies/`) and the user does not...

Yeah I should probably introduce another variable for the "default ruby" (defaults to system) and have `chruby_auto` reset back to the default ruby as opposed to system ruby. Although, you...

Before we brainstorm how this feature should work, I'm curious what's wrong with just installing the desired default ruby version into `/usr/local` as the new system ruby? Installing gems might...

> I'm not looking to change the system Ruby, because that sometimes breaks things. That is a valid concern. Any script or package that uses `#!/usr/bin/env ruby` could potentially break...

@todd-a-jacobs feel free to try implementing this based on our discussion. I'd recommend branching off the [0.4.0](https://github.com/postmodern/chruby/tree/0.4.0) branch. Take note of [chruby_auto_test.sh](https://github.com/postmodern/chruby/blob/0.4.0/test/unit/chruby_auto_test.sh) and how I'm testing `chruby_auto`. It should be...

I forgot that there is already a branch where I experimented with adding `chruby --default ...` and `chruby default`. Checkout 9682bfaf72b79bf434fb36b7d84443b4b8f087ee. Still needs some tests, but it seems to satisfy...

Added some tests, but ran into an interesting edge-case. @todd-a-jacobs what do you think `chruby --default` with no argument should do? Print an error? Print the current default ruby? Unset...

I've decided that `chruby --default ""` should probably print an error, otherwise if someone put `chruby --default $var` in their `~/.bashrc` and `var` is not set, that would be confusing...