From ba1276e9c8db134745b406a2d124cca1702f1d82 Mon Sep 17 00:00:00 2001 From: oGre Date: Thu, 1 Oct 2015 21:56:14 +0200 Subject: [PATCH] Honor VIRTUAL_ENV_DISABLE_PROMPT, if it is set to non-empty string --- gitprompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitprompt.sh b/gitprompt.sh index 00a79c2..a08cde4 100755 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -273,7 +273,7 @@ function git_prompt_config() { EMPTY_PROMPT="$OLD_GITPROMPT" else local ps="" - if [[ -n "$VIRTUAL_ENV" ]]; then + if [[ -n "$VIRTUAL_ENV" && -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ]]; then VENV=$(basename "${VIRTUAL_ENV}") ps="${ps}${GIT_PROMPT_VIRTUALENV//_VIRTUALENV_/${VENV}}" fi