File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,22 @@ source /usr/local/share/chruby/chruby.sh
217217source /usr/local/share/chruby/auto.sh
218218```
219219
220- * Note:* macOS does not automatically execute ` ~/.bashrc ` , instead try adding to ` /etc/bashrc ` .
220+ > * Note:* macOS does not automatically source ` ~/.bashrc ` . Bash users should
221+ > create the file ` ~/.bash_profile ` with following content:
222+ >
223+ > ``` bash
224+ > if [[ -f ~ /.profile ]]; then
225+ > source ~ /.profile
226+ > fi
227+ >
228+ > if [[ $- == * i* ]] && [[ -f ~ /.bashrc ]]; then
229+ > source ~ /.bashrc
230+ > fi
231+ > ` ` `
232+ >
233+ > so that the terminal loads ` ~/.bashrc` and ` ~/.profile` (the POSIX one). If
234+ > ` ~/.bash_profile` exists, Bash users should append the above lines to
235+ > ` ~/.bash_profile` as needed.
221236
222237chruby will check the current and parent directories for a [.ruby-version]
223238file. Other Ruby switchers also understand this file:
You can’t perform that action at this time.
0 commit comments