mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Remove the sample code from pyenv init
since there proved to be to many cases to fit
This commit is contained in:
parent
19f74e41f0
commit
eb89256f59
2 changed files with 3 additions and 62 deletions
|
@ -93,68 +93,9 @@ function help_() {
|
||||||
|
|
||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
echo '# (The below instructions are intended for common'
|
echo '# See the README for instructions on how to set up'
|
||||||
echo '# shell setups. See the README for more guidance'
|
echo '# your shell environment for Pyenv.'
|
||||||
echo '# if they don'\''t apply and/or don'\''t work for you.)'
|
|
||||||
echo
|
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
|
} >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ OUT
|
||||||
@test "fish instructions" {
|
@test "fish instructions" {
|
||||||
run pyenv-init fish
|
run pyenv-init fish
|
||||||
assert [ "$status" -eq 1 ]
|
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" {
|
@test "option to skip rehash" {
|
||||||
|
|
Loading…
Reference in a new issue