248f4cbf1d983b0f6cfb224623dd8d03f9b73b9d

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

Message

Convert README to rst file

Diff

This diff is truncated to protect this page.

  1diff --git a/README.md b/README.md
  2deleted file mode 100644
  3index 1043f0756cd44a15698bd2c056990db57f128581..0000000000000000000000000000000000000000
  4--- a/README.md
  5+++ /dev/null
  6@@ -1,178 +0,0 @@
  7-Autoswitch Python Virtualenv
  8-============================
  9-
 10-![Travis CI](https://travis-ci.org/MichaelAquilina/zsh-autoswitch-virtualenv.svg?branch=master)
 11-
 12-*zsh-autoswitch-virtualenv* is a simple ZSH plugin that switches python virtualenvs automatically as
 13-you move between directories.
 14-
 15-:tada: Pull Requests for fixes or improvements are welcome! :tada:
 16-
 17-How it Works
 18-------------
 19-
 20-Simply call the `mkvenv` command in the directory you wish to setup a virtual environment.
 21-A virtual environment specific to that folder will now activate every time you enter it.
 22-
 23-See the *Commands* section below for more detail.
 24-
 25-More Details
 26-------------
 27-
 28-Moving out of the directory will automatically deactivate the virtual environment. However you can
 29-also switch to a default python virtual environment instead by setting the `AUTOSWITCH_DEFAULTENV`
 30-environment variable.
 31-
 32-Internally this plugin simply works by creating a file named `.venv` which contains the name of the
 33-virtual environment created (which is the same name as the current directory but can be edited if
 34-needed). There is then a precommand hook that looks for a `.venv` file and switches to the name
 35-specified if one is found.
 36-
 37-**NOTE**: you may want to add `.venv` to your `.gitignore` in git projects (or equivalent file for
 38-the Version Control you are using).
 39-
 40-Requirements
 41-------------
 42-
 43-`virtualenvwrapper` must be installed for this plugin to work correctly. You should install it with pip:
 44-
 45-```
 46-pip install virtualenvwrapper
 47-```
 48-
 49-You need to source this file in your `.zshrc` file as part of your setup. This should work:
 50-
 51-```
 52-source =virtualenvwrapper.sh
 53-```
 54-
 55-Installing with ZSH Package Managers
 56--------------------------------------
 57-
 58-Add one of the following lines to your `.zshrc` file depending on the package manager you are using:
 59-
 60-#### [ZPlug](https://github.com/zplug/zplug)
 61-```
 62-zplug MichaelAquilina/zsh-autoswitch-virtualenv
 63-```
 64-
 65-#### [Antigen](https://github.com/zsh-users/antigen)
 66-```
 67-antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
 68-```
 69-
 70-#### [Zgen](https://github.com/tarjoilija/zgen)
 71-```
 72-zgen load MichaelAquilina/zsh-autoswitch-virtualenv
 73-```
 74-
 75-Commands
 76---------
 77-
 78-##### mkvenv
 79-
 80-Setup a new project with virtualenv autoswitching using the `mkvenv` helper command.
 81-
 82-```
 83-$ cd my-python-project
 84-$ mkvenv
 85-Using real prefix '/usr'
 86-New python executable in /home/michael/.virtualenvs/my-python-project/bin/python2
 87-Also creating executable in /home/michael/.virtualenvs/my-python-project/bin/python
 88-Installing setuptools, pip, wheel...done.
 89-Found a requirements.txt. Install? [y/N]:
 90-Collecting requests (from -r requirements.txt (line 1))
 91-  Using cached requests-2.11.1-py2.py3-none-any.whl
 92-Installing collected packages: requests
 93-Successfully installed requests-2.11.1
 94-```
 95-
 96-`mkvenv` will create a virtual environment with the same name as the current directory, suggest
 97-installing `requirements.txt` if available and create the relevant `.venv` file for you.
 98-
 99-Next time you switch to that folder, you'll see the following message
100-
101-```
102-$ cd my-python-project
103-Switching virtualenv: my-python-project  [Python 3.4.3+]
104-$
105-```
106diff --git a/README.rst b/README.rst
107new file mode 100644
108index 0000000000000000000000000000000000000000..0a4833c576cc7936c42fdedf1846e6c60db42866
109--- /dev/null
110+++ b/README.rst
111@@ -0,0 +1,203 @@
112+Autoswitch Python Virtualenv
113+============================
114+
115+|TravisCI|
116+
117+*zsh-autoswitch-virtualenv* is a simple ZSH plugin that switches python
118+virtualenvs automatically as you move between directories.
119+
120+:tada: Pull Requests for fixes or improvements are welcome! :tada:
121+
122+How it Works
123+------------
124+
125+Simply call the ``mkvenv`` command in the directory you wish to setup a
126+virtual environment. A virtual environment specific to that folder will
127+now activate every time you enter it.
128+
129+See the *Commands* section below for more detail.
130+
131+More Details
132+------------
133+
134+Moving out of the directory will automatically deactivate the virtual
135+environment. However you can also switch to a default python virtual
136+environment instead by setting the ``AUTOSWITCH_DEFAULTENV`` environment
137+variable.
138+
139+Internally this plugin simply works by creating a file named ``.venv``
140+which contains the name of the virtual environment created (which is the
141+same name as the current directory but can be edited if needed). There
142+is then a precommand hook that looks for a ``.venv`` file and switches
143+to the name specified if one is found.
144+
145+**NOTE**: you may want to add ``.venv`` to your ``.gitignore`` in git
146+projects (or equivalent file for the Version Control you are using).
147+
148+Requirements
149+------------
150+
151+``virtualenvwrapper`` must be installed for this plugin to work
152+correctly. You should install it with pip:
153+
154+::
155+
156+    pip install virtualenvwrapper
157+
158+You need to source this file in your ``.zshrc`` file as part of your
159+setup. This should work:
160+
161+::
162+
163+    source =virtualenvwrapper.sh
164+
165+Installing with ZSH Package Managers
166+------------------------------------
167+
168+Add one of the following lines to your ``.zshrc`` file depending on the
169+package manager you are using:
170+
171+`ZPlug <https://github.com/zplug/zplug>`__
172+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173+
174+::
175+
176+    zplug MichaelAquilina/zsh-autoswitch-virtualenv
177+
178+`Antigen <https://github.com/zsh-users/antigen>`__
179+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
180+
181+::
182+
183+    antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
184+
185+`Zgen <https://github.com/tarjoilija/zgen>`__
186+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
187+
188+::
189+
190+    zgen load MichaelAquilina/zsh-autoswitch-virtualenv
191+
192+Commands
193+--------
194+
195+mkvenv
196+''''''
197+
198+Setup a new project with virtualenv autoswitching using the ``mkvenv``
199+helper command.
200+
201+::
202+
203+    $ cd my-python-project
204+    $ mkvenv
205+    Using real prefix '/usr'
206+    New python executable in /home/michael/.virtualenvs/my-python-project/bin/python2
207+    Also creating executable in /home/michael/.virtualenvs/my-python-project/bin/python
208+    Installing setuptools, pip, wheel...done.
209+    Found a requirements.txt. Install? [y/N]:
210+    Collecting requests (from -r requirements.txt (line 1))