From 5ec7648af6eb3548765fb814c4d6af76d43ce4d8 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 May 2023 21:42:43 -0700 Subject: [PATCH] Add details to basic usage docs about setting `VIRTUAL_ENV_DISABLE_PROMPT` (#7874) --- docs/basic-usage.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/basic-usage.md b/docs/basic-usage.md index 472b647ed1c..43f9c6906b8 100644 --- a/docs/basic-usage.md +++ b/docs/basic-usage.md @@ -149,6 +149,9 @@ Therefore, Poetry has to create a sub-shell with the virtual environment activat in order for the subsequent commands to run from within the virtual environment. {{% /note %}} +If you'd like to prevent `poetry shell` from modifying your shell prompt on virtual environment activation, you should +set `VIRTUAL_ENV_DISABLE_PROMPT=1` as an environment variable before running the command. + Alternatively, to avoid creating a new shell, you can manually activate the virtual environment by running `source {path_to_venv}/bin/activate` (`{path_to_venv}\Scripts\activate.ps1` in PowerShell). To get the path to your virtual environment run `poetry env info --path`.