fda835626d3fc944e8a97a2d611d8b0df9cf75a8

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

Message

Add helper function to README

Diff

 1diff --git a/README.md b/README.md
 2index c06813e59feb5fe40608c937ad85e70ce5b8e698..340aa37849f24aa171ded170f1c268ac591a75ad 100644
 3--- a/README.md
 4+++ b/README.md
 5@@ -9,7 +9,14 @@ default python virtual environment - set by the `AUTOSWITCH_DEFAULTENV` environm
 6 `AUTOSWITCH_DEFAULTENV` has not been set, then moving to a directory without a `.venv` file will
 7 deactivate any currently active virtualenv.
 8 
 9-NOTE: The virutalenv you specify in `.venv` must already exist.
10+NOTE: The virutalenv you specify in `.venv` must already exist. I personally use the following function (found in my `~/.zshrc`) to make this process convenient:
11+```
12+function mkvenv() {
13+   venv_name="$(basename $PWD)"
14+   echo "$venv_name" > ".venv"
15+   mkvirtualenv "$venv_name" $@
16+}
17+```
18 
19 :tada: Pull Requests for fixes or improvements are welcome! :tada:
20