a276bd010efaf40c6917954b8aab7a5e8fe1f148

Author
Michael Aquilina <michaelaquilina@gmail.com>
Committer
Michael Aquilina <michaelaquilina@gmail.com>
Date

Message

Color virtualenv name being removed by rmvenv

Diff

 1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
 2index 1a01b1c75f98063acc32ff13ad9b9d23af415be7..c3703b05d5784b37931b7dc3c8182dfda725a048 100644
 3--- a/autoswitch_virtualenv.plugin.zsh
 4+++ b/autoswitch_virtualenv.plugin.zsh
 5@@ -11,7 +11,6 @@ BOLD="\e[1m"
 6 NORMAL="\e[0m"
 7 
 8 
 9-
10 if ! type "virtualenv" > /dev/null; then
11     export DISABLE_AUTOSWITCH_VENV="1"
12     printf "${BOLD}${RED}"
13@@ -150,7 +149,7 @@ function rmvenv()
14         fi
15     fi
16 
17-    printf "Removing %s...\n" "$venv_name"
18+    printf "Removing ${PURPLE}%s${NORMAL}...\n" "$venv_name"
19     rm -rf "$VIRTUAL_ENV_DIR/$venv_name"
20     rm ".venv"
21   else
22diff --git a/tests/test_rmvenv.zunit b/tests/test_rmvenv.zunit
23index 2c8d53703304437d752e7a0c33b434e0bd27ccb4..9ef479905b18eedbd79371017b6ac79df7376081 100644
24--- a/tests/test_rmvenv.zunit
25+++ b/tests/test_rmvenv.zunit
26@@ -30,7 +30,7 @@
27     run rmvenv
28 
29     assert $state equals 0
30-    assert "$output" same_as "Removing 12345..."
31+    assert "$output" same_as "Removing \e[35m12345\e[0m..."
32     test ! -f .venv
33     test ! -d "$HOME/.virtualenvs/12345"
34 }
35@@ -42,7 +42,7 @@
36     run rmvenv
37 
38     assert $state equals 0
39-    assert "$output" same_as "Removing $test_venv..."
40+    assert "$output" same_as "Removing \e[35m$test_venv\e[0m..."
41     test ! -f .venv
42     test ! -d "$HOME/.virtualenvs/$test_venv"
43 }