59c1ec80aa9b018db34078e69a27e57aea5ad761

Author
Rocky <thenoid@users.noreply.github.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

agnoster: fix VIRTUAL_ENV_DISABLE_PROMPT logic (#8050)

Fixes #7985

Diff

 1diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
 2index 518a14a37562d40768dc21c130ca17ca000e4e4f..7e37440a4dcc91d7fe4e03334e2f8cc40a618bcb 100644
 3--- a/themes/agnoster.zsh-theme
 4+++ b/themes/agnoster.zsh-theme
 5@@ -204,7 +204,7 @@ prompt_dir() {
 6 # Virtualenv: current working virtualenv
 7 prompt_virtualenv() {
 8   local virtualenv_path="$VIRTUAL_ENV"
 9-  if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
10+  if [[ -n $virtualenv_path && -z $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
11     prompt_segment blue black "(`basename $virtualenv_path`)"
12   fi
13 }