Skip to content

Commit

Permalink
docs: Add configuration option for Fish 3.2.0+ (#2449)
Browse files Browse the repository at this point in the history
The original instructions were added 2 years ago in 0f2d659. Since then, [Fish released](https://github.com/fish-shell/fish-shell/releases/tag/3.2.0) [a more declarative instruction for this operation](https://fishshell.com/docs/current/cmds/fish_add_path.html), which is now the recommended way of manipulating `PATH` in Fish.
  • Loading branch information
gregorias committed Sep 6, 2022
1 parent f6f1803 commit 6a104f6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,21 @@ See [Advanced configuration](#advanced-configuration) for details and more confi

- For **Fish shell**:

Execute this interactively:
If you have Fish 3.2.0 or newer, execute this interactively:

~~~ fish
set -Ux PYENV_ROOT $HOME/.pyenv
fish_add_path $PYENV_ROOT/bin
~~~

Otherwise, execute the snippet below:

~~~ fish
set -Ux PYENV_ROOT $HOME/.pyenv
set -U fish_user_paths $PYENV_ROOT/bin $fish_user_paths
~~~

And add this to `~/.config/fish/config.fish`:
Now, add this to `~/.config/fish/config.fish`:

~~~ fish
pyenv init - | source
Expand Down

0 comments on commit 6a104f6

Please sign in to comment.