diff --git a/libexec/pyenv-init b/libexec/pyenv-init index bc117495..840c31e0 100755 --- a/libexec/pyenv-init +++ b/libexec/pyenv-init @@ -93,68 +93,9 @@ function help_() { { echo - echo '# (The below instructions are intended for common' - echo '# shell setups. See the README for more guidance' - echo '# if they don'\''t apply and/or don'\''t work for you.)' + echo '# See the README for instructions on how to set up' + echo '# your shell environment for Pyenv.' echo - case "$shell" in - fish ) - echo "# Add pyenv executable to PATH by running" - echo "# the following interactively:" - echo - echo 'set -Ux PYENV_ROOT $HOME/.pyenv' - echo 'set -U fish_user_paths $PYENV_ROOT/bin $fish_user_paths' - echo - echo "# Load pyenv automatically by appending" - echo "# the following to ~/.config/fish/config.fish:" - echo - echo 'status is-interactive; and pyenv init --path | source' - echo 'pyenv init - | source' - echo - echo "# If fish is not your login shell," - echo "# add the following to ~/.profile:" - echo - echo 'export PYENV_ROOT="$HOME/.pyenv"' - echo 'export PATH="$PYENV_ROOT/bin:$PATH"' - echo 'eval "$(pyenv init --path)"' - echo - ;; - * ) - echo '# Add pyenv executable to PATH and' - echo '# enable shims by adding the following' - case "$shell" in - bash|ksh ) - echo '# to ~/.profile:' - ;; - * ) - echo '# to ~/.profile and '"${profile}"':' - ;; - esac - echo - echo 'export PYENV_ROOT="$HOME/.pyenv"' - echo 'export PATH="$PYENV_ROOT/bin:$PATH"' - echo 'eval "$(pyenv init --path)"' - echo - if [[ $shell == "bash" ]]; then - echo '# If your ~/.profile sources '"${rc}"',' - echo '# the lines need to be inserted before the part' - 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' - echo '# copying them there or by sourcing ~/.profile' - echo - fi - echo "# Load pyenv into the shell by adding" - echo "# the following to ${rc}:" - echo - echo 'eval "$(pyenv init -)"' - echo - echo '# Make sure to restart your entire logon session' - echo '# for changes to profile files to take effect.' - echo - ;; - esac } >&2 } diff --git a/test/init.bats b/test/init.bats index bcb937c1..1b597571 100755 --- a/test/init.bats +++ b/test/init.bats @@ -53,7 +53,7 @@ OUT @test "fish instructions" { run pyenv-init fish assert [ "$status" -eq 1 ] - assert_line 'pyenv init - | source' + assert_line '# See the README for instructions on how to set up' } @test "option to skip rehash" {