Merge pull request #38 from MichaelAquilina/update_help_message
Update help message with better format
Diff
1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
2index 446f0583be077327911587fb1de01f0ca0206e36..817d12d895190d92a32614a39f3d9ba60873de34 100644
3--- a/autoswitch_virtualenv.plugin.zsh
4+++ b/autoswitch_virtualenv.plugin.zsh
5@@ -2,13 +2,16 @@ if ! type workon > /dev/null; then
6 export DISABLE_AUTOSWITCH_VENV="1"
7 printf "\e[1m\e[31m"
8 printf "zsh-autoswitch-virtualenv requires virtualenvwrapper to be installed!\n\n"
9- printf "If this is already installed but you are still seeing this message, add the "
10- printf "following to your ~/.zshrc:\n"
11- printf "\e[39m"
12+ printf "\e[0m\e[39m"
13+ printf "If this is already installed but you are still seeing this message, \nadd the "
14+ printf "following to your ~/.zshrc:\n\n"
15+ printf "\e[1m"
16 printf "source =virtualenvwrapper.sh\n"
17 printf "\n"
18- printf "See https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv#Setup for more details\n"
19 printf "\e[0m"
20+ printf "https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv#Setup"
21+ printf "\e[0m"
22+ printf "\n"
23 fi
2425 function _maybeworkon() {
26diff --git a/tests/test_help.zunit b/tests/test_help.zunit
27index a60604df99bb66c7fc2c52ac5fe97f75df8956f5..7d1d8854651c55fbbaffb25d7a5424e8701ee3f3 100644
28--- a/tests/test_help.zunit
29+++ b/tests/test_help.zunit
30@@ -6,9 +6,11 @@
31 assert $status equals 0
32 assert "$lines[1]" contains "zsh-autoswitch-virtualenv requires virtualenvwrapper to be installed!"
33 assert "$lines[2]" is_empty
34- assert "$lines[3]" contains "If this is already installed but you are still seeing this message, add the following to your ~/.zshrc"
35- assert "$lines[4]" contains "source =virtualenvwrapper.sh"
36+ assert "$lines[3]" contains "If this is already installed but you are still seeing this message,"
37+ assert "$lines[4]" contains "add the following to your ~/.zshrc"
38 assert "$lines[5]" is_empty
39- assert "$lines[6]" contains "See https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv#Setup for more details"
40- assert ${#lines} equals 7
41+ assert "$lines[6]" contains "source =virtualenvwrapper.sh"
42+ assert "$lines[7]" is_empty
43+ assert "$lines[8]" contains "https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv#Setup"
44+ assert ${#lines} equals 8
45 }