211035371918adccc3fdf2753bce04d987e43b9f

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

Message

Merge pull request #1 from unixorn/add-zgen-instructions

Add zgen instructions

Diff

 1diff --git a/README.md b/README.md
 2index a0685b5edf0c8e0270ae31ced11951a7806612b0..60f9175773026ad1a47cdd88307076ce3f1bfe94 100644
 3--- a/README.md
 4+++ b/README.md
 5@@ -1,15 +1,15 @@
 6 Autoswitch Python Virtualenv
 7 ============================
 8 
 9-Simple ZSH plugin that switches python virtualenvs automatically as you move between directories.
10+*zsh-autoswitch-virtualenv* is a simple ZSH plugin that switches python virtualenvs automatically as you move between directories.
11 
12 Simply create a `.venv` file with the name of the virtualenv you want to automatically switch to
13-when you move into the directory. Moving out of the directory will automatically switch back to the
14+when you move into a directory. Moving out of the directory will automatically switch back to the
15 default python virtual environment - set by the `AUTOSWITCH_DEFAULTENV` environment variable. If
16-`AUTOSWITCH_DEFAULTENV` has not been set, then moving to a directory without a `.venv` file will simply
17+`AUTOSWITCH_DEFAULTENV` has not been set, then moving to a directory without a `.venv` file will
18 deactivate any currently active virtualenv.
19 
20-NOTE that the virutalenv you specify in `.venv` must already exist.
21+NOTE: The virutalenv you specify in `.venv` must already exist.
22 
23 :tada: Pull Requests for fixes or improvements are welcome! :tada:
24 
25@@ -22,20 +22,32 @@ On Ubuntu simply install from the standard repositories:
26 
27 `sudo apt-get install virtualenvwrapper`
28 
29-Mac OSX can install `virtualenvwrapper` from brew:
30+Mac OSX users can install `virtualenvwrapper` with brew:
31 
32 `brew install virtualenvwrapper`
33 
34+Installing with Antigen
35+-----------------------
36 
37-Installation from Antigen
38--------------------------
39-
40-Installing from [Antigen](https://github.com/zsh-users/antigen) is super easy! Just add the following line to your `.zshrc`:
41+Installing with [Antigen](https://github.com/zsh-users/antigen) is super easy! Just add the following line to your `.zshrc`:
42 
43 ```
44 antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
45 ```
46-if you want to set a default virtual environment then you can also export `AUTOSWITCH_DEFAULTENV` in
47+
48+Installing with Zgen
49+--------------------
50+
51+Installing with [Zgen](https://github.com/tarjoilija/zgen) is also easy! Add the following line to your `.zshrc`:
52+
53+```zgen load unixorn/tumult.plugin.zsh```
54+
55+where you're making your other `zgen load` calls.
56+
57+Setting a default virtualenv
58+----------------------------
59+
60+If you want to set a default virtual environment then you can also export `AUTOSWITCH_DEFAULTENV` in
61 your `.zshrc` file.
62 
63 ```
64@@ -52,12 +64,14 @@ $ cd my-python-project
65 $ mkvirtualenv my-python-project
66 $ echo "my-python-project" > .venv
67 ```
68+
69 Next time you switch to that folder, you'll see the following message
70 ```
71 $ cd my-python-project
72 Switching virtualenv: my-python-project  [Python 3.4.3+]
73 $
74 ```
75+
76 If you have set the `AUTOSWITCH_DEFAULTENV` environment variable, exiting that directory will switch
77 back to the value set.
78 ```
79@@ -65,6 +79,7 @@ $ cd ..
80 Switching virtualenv: mydefaultenv  [Python 3.4.3+]
81 $
82 ```
83+
84 Otherwise, `deactivate` will simply be called on the virtualenv to switch back to the global
85 python environment.
86