From b61536e9ee8c56407c8cbd5e4a8c5c4ca90d1ebd Mon Sep 17 00:00:00 2001 From: Jan Bronicki <56229312+John15321@users.noreply.github.com> Date: Wed, 13 Jan 2021 19:36:39 +0100 Subject: [PATCH 1/2] more general installation readme instructions --- README.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1307d8a5..0b89f906 100644 --- a/README.md +++ b/README.md @@ -232,12 +232,26 @@ easy to fork and contribute any changes back upstream. 3. **Add `pyenv init` to your shell** to enable shims and autocompletion. Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell configuration file since it manipulates `PATH` during the initialization. - ```sh - echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile - ``` - - **Zsh note**: Modify your `~/.zshrc` file instead of `~/.bash_profile`. - - **fish note**: Use `pyenv init - | source` instead of `eval (pyenv init -)`. - - **Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`. + + - For **bash**: + ~~~ bash + echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile + ~~~ + + - For **Ubuntu Desktop** and **Fedora**: + ~~~ bash + echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc + ~~~ + + - For **Zsh**: + ~~~ zsh + echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc + ~~~ + + - For **Fish shell**: + ~~~ fish + echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$pyenv init - | source"\nfi' >> ~/.bash_profile + ~~~ **General warning**: There are some systems where the `BASH_ENV` variable is configured to point to `.bashrc`. On such systems you should almost certainly put the above mentioned line From f53aa3e64ec522803cdf87fe87e90f17e11684ec Mon Sep 17 00:00:00 2001 From: Anton Petrov Date: Fri, 15 Jan 2021 08:02:25 +0300 Subject: [PATCH 2/2] Update README.md corrected fish shell command --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b89f906..f4796a7c 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,7 @@ easy to fork and contribute any changes back upstream. - For **Fish shell**: ~~~ fish - echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$pyenv init - | source"\nfi' >> ~/.bash_profile + echo -e '\n\n# pyenv init\nif command -v pyenv 1>/dev/null 2>&1\n pyenv init - | source\nend' >> ~/.config/fish/config.fish ~~~ **General warning**: There are some systems where the `BASH_ENV` variable is configured