511fe6bf0fd67969dcad7f7c080bbb531bcce573

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

Message

Merge pull request #35 from MichaelAquilina/clearer_help_message

Link to README setup in help message

Diff

  1diff --git a/README.rst b/README.rst
  2index 63e1ea437982d4906950fc9e4af1ff91426bd54f..9ace82092fee0ad3e111dedb495e857199e4bc63 100644
  3--- a/README.rst
  4+++ b/README.rst
  5@@ -8,8 +8,8 @@ virtualenvs automatically as you move between directories.
  6 
  7 * `How it Works`_
  8 * `More Details`_
  9-* Requirements_
 10 * Installing_
 11+* Setup_
 12 * Commands_
 13 * Options_
 14 * `Security Warnings`_
 15@@ -42,8 +42,32 @@ to the name specified if one is found.
 16 **NOTE**: you may want to add ``.venv`` to your ``.gitignore`` in git
 17 projects (or equivalent file for the Version Control you are using).
 18 
 19-Requirements
 20-------------
 21+Installing
 22+----------
 23+
 24+Add one of the following lines to your ``.zshrc`` file depending on the
 25+package manager you are using:
 26+
 27+ZPlug_
 28+
 29+::
 30+
 31+    zplug "MichaelAquilina/zsh-autoswitch-virtualenv"
 32+
 33+Antigen_
 34+
 35+::
 36+
 37+    antigen bundle "MichaelAquilina/zsh-autoswitch-virtualenv"
 38+
 39+Zgen_
 40+
 41+::
 42+
 43+    zgen load "MichaelAquilina/zsh-autoswitch-virtualenv"
 44+
 45+Setup
 46+-----
 47 
 48 ``virtualenvwrapper`` must be installed for this plugin to work
 49 correctly. You should install it with pip:
 50@@ -59,7 +83,7 @@ setup. This should work:
 51 
 52     source =virtualenvwrapper.sh
 53 
 54-Make sure this is put *before* your package manager loading code (i.e. the
 55+**IMPORTANT:** Make sure this is put *before* your package manager loading code (i.e. the
 56 line of code discussed in the section that follows).
 57 
 58 In combination, your ``.zshrc`` file should look something like this (if you
 59@@ -72,31 +96,6 @@ are using zplug)
 60 
 61     zplug load
 62 
 63-
 64-Installing
 65-----------
 66-
 67-Add one of the following lines to your ``.zshrc`` file depending on the
 68-package manager you are using:
 69-
 70-ZPlug_
 71-
 72-::
 73-
 74-    zplug "MichaelAquilina/zsh-autoswitch-virtualenv"
 75-
 76-Antigen_
 77-
 78-::
 79-
 80-    antigen bundle "MichaelAquilina/zsh-autoswitch-virtualenv"
 81-
 82-Zgen_
 83-
 84-::
 85-
 86-    zgen load "MichaelAquilina/zsh-autoswitch-virtualenv"
 87-
 88 Commands
 89 --------
 90 
 91diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
 92index faafa873ceccc70b1e1754b904f59857f0347a32..c615cbb9fd9562687e8d026590d4d04b01bad222 100644
 93--- a/autoswitch_virtualenv.plugin.zsh
 94+++ b/autoswitch_virtualenv.plugin.zsh
 95@@ -6,6 +6,8 @@ if ! type workon > /dev/null; then
 96     printf "following to your ~/.zshrc:\n"
 97     printf "\e[39m"
 98     printf "source =virtualenvwrapper.sh\n"
 99+    printf "\n"
100+    printf "See https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv#Setup for more details\n"
101     printf "\e[0m"
102 fi
103 
104diff --git a/tests/test_help.zunit b/tests/test_help.zunit
105index b50c2435f18a8cc2c12a33ad4628fe6361abdfbd..a60604df99bb66c7fc2c52ac5fe97f75df8956f5 100644
106--- a/tests/test_help.zunit
107+++ b/tests/test_help.zunit
108@@ -8,4 +8,7 @@
109     assert "$lines[2]" is_empty
110     assert "$lines[3]" contains "If this is already installed but you are still seeing this message, add the following to your ~/.zshrc"
111     assert "$lines[4]" contains "source =virtualenvwrapper.sh"
112+    assert "$lines[5]" is_empty
113+    assert "$lines[6]" contains "See https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv#Setup for more details"
114+    assert ${#lines} equals 7
115 }