Commit graph

5 commits

Author SHA1 Message Date
Mislav Marohnić
878bd87328 reliably detect parent shell in rbenv init
`$SHELL` variable is a terrible way of detecting the current shell
because it's not even supposed to reflect the current shell; it's meant
for keeping the value of the default shell for programs to start.

If an explicit `<shell>` argument wasn't passed to `rbenv init`, it
tries to detect the shell by getting the name of its parent process. If
this fails, it falls back on the value of `$SHELL` as before.

Furthermore, `rbenv init` will set the RBENV_SHELL variable in the
current shell to the value of the detected shell so that `sh-shell` and
`sh-rehash` commands don't have to repeat the detection.
2013-10-07 03:24:45 +02:00
Yamashita Yuu
5bfec84432 add fish shell support 2013-09-28 16:11:02 +02:00
Mislav Marohnić
7fc5f46bbb undo assert_output_lines in tests
It was a dumb idea and it wasn't even implemented perfectly.
2013-04-08 23:16:35 +02:00
Mislav Marohnić
969af1567a add tests for rehash, whence, which 2013-04-08 23:02:30 +02:00
Mislav Marohnić
bb6bccb782 tests galore 2013-03-07 15:07:32 -05:00