0f9db24f9f4c4e6d6882d5857e94da810b8f243d

Author
Jacob Magnusson <m@jacobian.se>
Committer
Jacob Magnusson <m@jacobian.se>
Date

Message

Fix: Agnoster theme added venv name even if disabled
See http://www.virtualenv.org/en/latest/index.html\?highlight\=virtual_env_disable_prompt\#activate-script for info regarding this.

Diff

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