I want to have a "default" virtual environment, and for such I don't want to have a prompt prefix. The following option allows one to customize the prompt prefix for for a given environment:
--prompt=PROMPT       Provides an alternative prompt prefix for this environment
But I couldn't figure out how to use it to set an empty prefix. Is there a way for that?
I was using VIRTUAL_ENV_DISABLE_PROMPT to disable prompt prefix globally, but I changed my mind once I came to know the --prompt option. I want to choose the environment to have no prefix.
We use a module named virtualenv which is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages that a Python project would need. After running this command, a directory named my_name will be created.
Set the VIRTUAL_ENV_DISABLE_PROMPT environment variable to 1 before sourcing bin/activate.
If you can't (or don't want to) do this, then you'll have to manually remove the relevant lines from bin/activate. You'll want to delete:
if [ -z "$VIRTUAL_ENV_DISABLE_PROMPT" ] ; then
    # ...
fi
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With