mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 11:33:49 -05:00
README: make fish PATH add conditional on the directory existing (#2786)
This commit is contained in:
16
README.md
16
README.md
@@ -235,21 +235,21 @@ See [Advanced configuration](#advanced-configuration) for details and more confi
|
||||
<details>
|
||||
|
||||
1. If you have Fish 3.2.0 or newer, execute this interactively:
|
||||
~~~ fish
|
||||
```fish
|
||||
set -Ux PYENV_ROOT $HOME/.pyenv
|
||||
fish_add_path $PYENV_ROOT/bin
|
||||
~~~
|
||||
test -d $PYENV_ROOT/bin; and fish_add_path $PYENV_ROOT/bin
|
||||
```
|
||||
|
||||
2. Otherwise, execute the snippet below:
|
||||
~~~ fish
|
||||
```fish
|
||||
set -Ux PYENV_ROOT $HOME/.pyenv
|
||||
set -U fish_user_paths $PYENV_ROOT/bin $fish_user_paths
|
||||
~~~
|
||||
test -d $PYENV_ROOT/bin; and set -U fish_user_paths $PYENV_ROOT/bin $fish_user_paths
|
||||
```
|
||||
|
||||
3. Now, add this to `~/.config/fish/config.fish`:
|
||||
~~~ fish
|
||||
```fish
|
||||
pyenv init - fish | source
|
||||
~~~
|
||||
```
|
||||
</details>
|
||||
|
||||
### C. Restart your shell
|
||||
|
||||
Reference in New Issue
Block a user