From 6a104f68d014813fc8a8e270933ac564e094a931 Mon Sep 17 00:00:00 2001 From: Grzegorz Date: Tue, 6 Sep 2022 20:39:31 +0200 Subject: [PATCH] docs: Add configuration option for Fish 3.2.0+ (#2449) The original instructions were added 2 years ago in https://github.com/pyenv/pyenv/commit/0f2d659732094f6bef11361dbc6261132edc63e2. 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. --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c57ab35471..ba9f86a506 100644 --- a/README.md +++ b/README.md @@ -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