Add notes when to use the 2nd shell step

This commit is contained in:
Ivan Pozdeev 2021-06-08 17:23:08 +03:00
parent 03cabd88e9
commit 8cce6e8dd2

View file

@ -206,8 +206,9 @@ easy to fork and contribute any changes back upstream.
2. **Configure your shell's environment for Pyenv** 2. **Configure your shell's environment for Pyenv**
**Note:** The below instructions for specific shells are designed for common shell setups. **Note:** The below instructions for specific shells are designed for common shell setups;
If you have an uncommon setup and they don't work for you, they also install shell functions into interactive shells only.
If you have an uncommon setup and/or special needs and they don't work for you,
use the guidance text and the [Advanced Configuration](#advanced-configuration) use the guidance text and the [Advanced Configuration](#advanced-configuration)
section below to figure out what you need to do in your specific case. section below to figure out what you need to do in your specific case.
@ -303,10 +304,15 @@ easy to fork and contribute any changes back upstream.
**Proxy note**: If you use a proxy, export `http_proxy` and `https_proxy`, too. **Proxy note**: If you use a proxy, export `http_proxy` and `https_proxy`, too.
2. **Add `pyenv` into your shell** by running the output of `pyenv init -` 2. **Add `pyenv` into your shell as a shell function** by running the output of `pyenv init -`
to enable autocompletion and all subcommands. to enable autocompletion and subcommands that require `pyenv` to be a shell function.
This command needs to run at startup of any interactive shell instance. The subcommands enabled by this step are those that make changes to the current shell environment.
In Pyenv, that's only `pyenv shell`; another example is `pyenv activate` from the
[Pyenv-Virtualenv](https://github.com/pyenv/pyenv-virtualenv) plugin.
This step is optional. Run it whenever you need the above functions --
typically at startup of any interactive shell.
In an interactive login shell, it needs to run _after_ the commands In an interactive login shell, it needs to run _after_ the commands
from the previous step. from the previous step.