-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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".
- Loading branch information
Showing
3 changed files
with
152 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters