Skip to content

Commit 90f7b99

Browse files
committed
~/.*rc should be modified instead of ~/.*profile
Otherwise, there's no effect for non-login interactive shells
1 parent 294f64f commit 90f7b99

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,17 @@ From inside that directory you can:
3737
2. (OPTIONAL) **Add `pyenv virtualenv-init` to your shell** to enable auto-activation of virtualenvs. This is entirely optional but pretty useful. See "Activate virtualenv" below.
3838

3939
```sh
40-
$ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
40+
$ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
4141
```
4242

4343
**Fish shell note**: Add this to your `~/.config/fish/config.fish`
4444

4545
```sh
46-
status --is-interactive; and pyenv init - | source
4746
status --is-interactive; and pyenv virtualenv-init - | source
4847
```
4948

50-
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
49+
**Zsh note**: Modify your `~/.zshrc` file instead of `~/.bashrc`.
5150

52-
**Pyenv note**: You may also need to add `eval "$(pyenv init -)"` to your profile if you haven't done so already.
53-
5451
3. **Restart your shell to enable pyenv-virtualenv**
5552

5653
```sh

bin/pyenv-virtualenv-init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fi
5050
if [ -z "$print" ]; then
5151
case "$shell" in
5252
bash )
53-
profile='~/.bash_profile'
53+
profile='~/.bashrc'
5454
;;
5555
zsh )
5656
profile='~/.zshrc'

0 commit comments

Comments
 (0)