agnoster: fix VIRTUAL_ENV_DISABLE_PROMPT logic (#8050)

Fixes #7985
This commit is contained in:
Rocky 2019-07-31 01:23:50 -06:00 committed by Marc Cornellà
parent 9817e1e7ff
commit 59c1ec80aa
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ prompt_dir() {
# Virtualenv: current working virtualenv
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
if [[ -n $virtualenv_path && -z $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
prompt_segment blue black "(`basename $virtualenv_path`)"
fi
}