rbenv/test
Mislav Marohnić c3ba994ec2
rbenv init: modify shell config files instead of printing instructions (#1568)
When running `rbenv init`, typically during rbenv setup, users expected
their shell environment to be modified permanently. Instead, what the
command would do is print the instructions to the user and expect them
to edit their shell initialization files accordingly. This proved to
be unintuitive.

Now, running `rbenv init <shells>...` will modify the shell initialization
files of the following shells:

- bash: `~/.bash_profile` or `~/.bashrc` if the latter exists but the former does not
- zsh: `~/.zprofile` or `~/.zshrc` if the latter exists and mentions "rbenv"
- fish: `~/.config/fish/config.fish`

If no shells were specified on the command line, rbenv will try to detect
the current shell.

It should be safe to run `rbenv init` multiple times, as the command will
avoid modifying any shell startup file that already mentions "rbenv init".
2024-05-03 16:59:39 +02:00
..
libexec Add tests for rbenv PATH and RBENV_HOOK_PATH handling 2014-10-19 14:35:36 +02:00
--version.bats Improve git --version git revision lookup 2015-12-24 03:52:33 +01:00
commands.bats fix iterating through paths that have spaces in them 2013-04-01 01:04:19 +02:00
completions.bats add --help to subcommand completions 2015-11-19 12:05:19 -05:00
exec.bats Supply head -n flag explicitly 2021-05-05 22:42:56 +02:00
global.bats Remove support for legacy global version files 2015-12-28 22:05:00 -05:00
help.bats Clarify help text of some commands (#1567) 2024-04-29 14:20:47 +02:00
hooks.bats Simplify resolving symlinks, remove native extension (#1428) 2022-09-22 11:34:02 +02:00
init.bats rbenv init: modify shell config files instead of printing instructions (#1568) 2024-05-03 16:59:39 +02:00
local.bats Remove support for legacy version file 2015-12-28 21:34:07 -05:00
prefix.bats rbenv-prefix: do not silence rbenv-which for system version 2018-08-07 01:44:13 +02:00
rbenv.bats Add spec to cover inclusion of etc/ sub-folders in plugins test (#1492) 2023-03-27 15:51:59 +02:00
rehash.bats Revert support for user-installed gems (#1443) 2022-10-07 12:56:54 +02:00
run Simplify resolving symlinks, remove native extension (#1428) 2022-09-22 11:34:02 +02:00
shell.bats rbenv shell: properly declare global variables for zsh (#1566) 2024-04-29 14:20:21 +02:00
shims.bats tests galore 2013-03-07 15:07:32 -05:00
test_helper.bash Simplify resolving symlinks, remove native extension (#1428) 2022-09-22 11:34:02 +02:00
version-file-read.bats Disallow path segments and directory traversal in .ruby-version files 2019-04-03 12:58:25 +02:00
version-file-write.bats add tests for version commands 2013-04-08 23:16:35 +02:00
version-file.bats Fix https://github.com/rbenv/rbenv/issues/1065 2018-02-26 16:49:37 +08:00
version-name.bats Spelling fix 2020-04-23 07:59:28 +03:00
version-origin.bats Fix (revert) test/version-origin.bats 2020-01-16 23:24:42 +08:00
version.bats Prefer local over global version file 2022-10-15 11:11:48 -05:00
versions.bats 💅 Clean up version sorting and add test 2021-09-29 20:07:47 +02:00
whence.bats undo assert_output_lines in tests 2013-04-08 23:16:35 +02:00
which.bats Revert support for user-installed gems (#1443) 2022-10-07 12:56:54 +02:00