3 Commits

Author SHA1 Message Date
Jovier A. Jiménez
e83e7496fa remove redundant environment variable declaration 2024-09-14 16:26:24 -07:00
Jovier A. Jiménez
6c523f4ce3 add example of custom prompt string 2024-09-14 16:24:29 -07:00
Jovier A. Jiménez
119c4db68c update test setup to unset PYENV_VIRTUALENV_PROMPT 2024-09-14 16:23:01 -07:00
4 changed files with 4 additions and 1 deletions

View File

@@ -243,7 +243,7 @@ You can set certain environment variables to control pyenv-virtualenv.
* `PIP_VERSION`, if set and `venv` is preferred * `PIP_VERSION`, if set and `venv` is preferred
over `virtualenv`, install the specified version of pip. over `virtualenv`, install the specified version of pip.
* `PYENV_VIRTUALENV_VERBOSE_ACTIVATE`, if set, shows some verbose outputs on activation and deactivation * `PYENV_VIRTUALENV_VERBOSE_ACTIVATE`, if set, shows some verbose outputs on activation and deactivation
* `PYENV_VIRTUALENV_PROMPT`, if set, allows users to customize how `pyenv-virtualenv` modifies their shell prompt. The default prompt ("(venv)") is overwritten with any user-specified text. Specify the location of the virtual environment name with the string `{venv}`. * `PYENV_VIRTUALENV_PROMPT`, if set, allows users to customize how `pyenv-virtualenv` modifies their shell prompt. The default prompt ("(venv)") is overwritten with any user-specified text. Specify the location of the virtual environment name with the string `{venv}`. For example, the default prompt string would be `({venv})`.
## Version History ## Version History

View File

@@ -15,6 +15,7 @@ setup() {
unset PYENV_VIRTUALENV_DISABLE_PROMPT unset PYENV_VIRTUALENV_DISABLE_PROMPT
unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT
unset VIRTUAL_ENV_DISABLE_PROMPT unset VIRTUAL_ENV_DISABLE_PROMPT
unset PYENV_VIRTUALENV_PROMPT
unset _OLD_VIRTUAL_PS1 unset _OLD_VIRTUAL_PS1
stub pyenv-hooks "activate : echo" stub pyenv-hooks "activate : echo"
} }

View File

@@ -16,6 +16,7 @@ setup() {
unset PYENV_VIRTUALENV_DISABLE_PROMPT unset PYENV_VIRTUALENV_DISABLE_PROMPT
unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT unset PYENV_VIRTUAL_ENV_DISABLE_PROMPT
unset VIRTUAL_ENV_DISABLE_PROMPT unset VIRTUAL_ENV_DISABLE_PROMPT
unset PYENV_VIRTUALENV_PROMPT
unset _OLD_VIRTUAL_PS1 unset _OLD_VIRTUAL_PS1
stub pyenv-hooks "activate : echo" stub pyenv-hooks "activate : echo"
} }

View File

@@ -6,6 +6,7 @@ setup() {
export PYENV_ROOT="${TMP}/pyenv" export PYENV_ROOT="${TMP}/pyenv"
export HOOK_PATH="${TMP}/i has hooks" export HOOK_PATH="${TMP}/i has hooks"
mkdir -p "$HOOK_PATH" mkdir -p "$HOOK_PATH"
unset PYENV_VIRTUALENV_PROMPT
} }
@test "pyenv-virtualenv hooks" { @test "pyenv-virtualenv hooks" {