mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-03-27 21:37:05 +01:00
docs(virtualenv): Document how the virtual env prompt is computed
This commit is contained in:
parent
480f254157
commit
689787e117
1 changed files with 8 additions and 3 deletions
|
@ -7,9 +7,14 @@ To use it, add `virtualenv` to the plugins array of your zshrc file:
|
|||
plugins=(... virtualenv)
|
||||
```
|
||||
|
||||
The plugin creates a `virtualenv_prompt_info` function that you can use in your theme. It
|
||||
displays the prompt string set when creating the virtual environment (via the `--prompt` option),
|
||||
falling back to the basename of the current `$VIRTUAL_ENV`.
|
||||
The plugin creates a `virtualenv_prompt_info` function that you can use in your
|
||||
theme. It displays the prompt string set in the `$VIRTUAL_ENV_PROMPT`
|
||||
environment variable. The `activate` scripts for most Python virtual environment
|
||||
implementations set this variable to the value provided via the `--prompt`
|
||||
option when creating the virtual environment, or the basename of the environment
|
||||
directory if the option was not provided. For implementations that do not set
|
||||
`$VIRTUAL_ENV_PROMPT`, the plugin will display the basename of the virtual
|
||||
environment directory instead.
|
||||
|
||||
It uses two variables to control how that is shown:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue