diff --git a/README.md b/README.md index 534be6f5..05a296e5 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,21 @@ easy to fork and contribute any changes back upstream. eval "$(pyenv init --path)" ~~~ + + Alternatively, for an automated installation, you can run the following: + ~~~ bash + echo -e 'if shopt -q login_shell; then' \ + '\n export PYENV_ROOT="$HOME/.pyenv"' \ + '\n export PATH="$PYENV_ROOT/bin:$PATH"' \ + '\n eval "$(pyenv init --path)"' \ + '\nfi' >> ~/.bashrc + echo -e 'if [ -z "$BASH_VERSION" ]; then'\ + '\n export PYENV_ROOT="$HOME/.pyenv"'\ + '\n export PATH="$PYENV_ROOT/bin:$PATH"'\ + '\n eval "$(pyenv init --path)"'\ + '\nfi' >>~/.profile + ~~~ + **Note:** If you have `~/.bash_profile`, make sure that it too executes the above-added commands, e.g. by copying them there or by `source`'ing `~/.profile`. diff --git a/libexec/pyenv-init b/libexec/pyenv-init index 187d92ad..544cd49a 100755 --- a/libexec/pyenv-init +++ b/libexec/pyenv-init @@ -139,7 +139,7 @@ function help_() { if [[ $shell == "bash" ]]; then echo '# If your ~/.profile sources '"${rc}"',' echo '# the lines need to be inserted before the part' - echo '# that does that.' + echo '# that does that. See the README for another option.' echo echo '# If you have '"${profile}"', make sure that it' echo '# also executes the above lines -- e.g. by'