Prefer gawk over awk if both are available. Fixes rbenv-help on Solaris 11.1
Remove carriage return characters in version file Fixes #566
When created on Windows, .rbenv-version or .ruby-version files may have CR characters that will prevent rbenv from correctly parsing the Ruby version. Discard those characters when reading the file.
It seems that "comm" header can't be relied on cross-platform, but that "ucomm" is more portable. I have no idea whether it's the right value to use here, but it seems to be doing the job. Also strip trailing whitespace because OpenBSD 5.4 `ps` output is padded with spaces for some reason. Fixes #489
The non-extended regex pattern didn't work on OpenBSD so this switches grep to extended pattern mode that seems to work consistenty on all systems.
On other systems, we expected to find system Ruby in `/usr/bin`, but in OpenBSD 5.4 it will be found in `/usr/local/bin`. This replaces the limited USRBIN_ALT hack with a more generic `path_without` function that will ensure that the given executable is not present in the resulting PATH even if it's found in multiple system paths.
The error was "bash: no such file or directory" and it was due to bash being located in `/usr/local/bin` on OpenBSD 5.4 instead of `/bin` like on other systems. Fixed by keeping `/usr/local/bin` in PATH during the test run.
Fix rbenv on OpenBSD Fixes #519
In Travis CI environment, Bats thinks it's outputting to an interactive terminal, so it switches to "pretty" format and ANSI escape codes which don't look well in the final output.
ignore cache directory used by ruby-build
Remove Neckbeard reference in favor of Advanced
Fish user config file `~/.config/fish/config.fish` loads for every instance of fish shell, not just interactive ones. Since it's unnecessary and dangerous to eval `rbenv init -` output in non-interactive shells, wrap the invocation in a conditional that checks if the current shell is interactive. Fixes #501
It doesn't exist as a builtin, and it doesn't seem there is a way to detect support for a shell builtin that is portable. So, just detect fish and don't the rehash command at all. Fixes #478
Change `exec` semantics to allow using rbenv from a ruby process
Process substitution seems to be causing problems with some versions of bash on specific systems. Fixes #401
Avoids the case where shell detection would result in `basename "-bash"` invocation, triggering the error: basename: illegal option -- b fixes #462
`$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.
Have `rbenv prefix` handle the case where system Ruby is not installed, i.e. `rbenv which ruby` doesn't find ruby in PATH. Fixes #362
Provide an `rbenv install` example and explanation lower down, so that both folk that are following git install and Homebrew install will finish at the same section and learn how to use ruby-build. Also remove step 6 of manual install process: `rbenv rehash`. It's unnecessary at that point, even if they already did `rbenv install` (which rehashes automatically). Fixes #455, closes #456
It can be confusing if people mistake the example as instructions to install ruby-build with.