Postmodern

Results 523 comments of Postmodern

I'm still on the fence about this feature, as it seems we're shoe horning additional functionality into `chruby-exec`. Perhaps we should add a `chruby-shell`, to run commands with chruby pre-loaded.

Er, turn `chruby-exec` into something like `chruby-shell`. ``` chruby-exec --auto -- "cd /srv/my_app && ruby command here" ```

@tamird better description would be when you need to use chruby, but can't modify the shell's configuration to load `chruby.sh` and `auto.sh`.

@regularfry what do you mean by wrapper?

I don't think how we hook in `chruby_auto` works within the unit-test functions. I had to explicitly invoke `chruby_auto` to simulate it running after other commands.

@HaleTom so `trap '...' DEBUG` does not capture commands invoked from inside of functions, only at the top level. This means `chruby_auto` is automatically invoked in your unit-test. We need...

@HaleTom Apple (_still_) ships with Bash 3, so unfortunately all code has to be Bash 3 compatible. I have since switched to GitHub Actions, however I still need to fix...

Running this gives me: -e:1: no . floating literal anymore; put 0 before dot puts ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] ^ -e:1: syntax error, unexpected tINTEGER, expecting '(' puts...

Executing it in irb (2.0.0p247): ``` `chruby-exec ruby-2.0.0 -- ruby --version` => "ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]\n" `chruby-exec ruby-1.9 -- ruby --version` => "ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]\n"...

- bash 4.2.45 - ruby 2.0.0p247 - irb 0.7.0 Also, I executed irb via `\irb` to avoid any aliases. Do you use ohmyzsh by chance?