28d6d33804cab070443a8af3dca7ed3be4c07965

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

Message

Update README with more details and more structure

Diff

 1diff --git a/README.md b/README.md
 2index 9510efecc303846c606014ece258fb68454dd038..9a2e040ac394ae5451884ae95288ad2989119a82 100644
 3--- a/README.md
 4+++ b/README.md
 5@@ -10,8 +10,12 @@ How it Works
 6 ------------
 7 
 8 Simply call the `mkvenv` command in the directory you wish to setup a virtual environment.
 9-After that command is completed, everything is setup and you are good to go! See the
10-*Commands* section below for more detail.
11+A virtual environment specific to that folder will now activate every time you enter it.
12+
13+See the *Commands* section below for more detail.
14+
15+More Details
16+------------
17 
18 Moving out of the directory will automatically deactivate the virtual environment. However you can
19 also switch to a default python virtual environment instead by setting the `AUTOSWITCH_DEFAULTENV`
20@@ -78,6 +82,8 @@ zgen load MichaelAquilina/zsh-autoswitch-virtualenv
21 Commands
22 --------
23 
24+##### mkvenv
25+
26 Setup a new project with virtualenv autoswitching using the `mkvenv` helper command.
27 
28 ```
29@@ -130,6 +136,8 @@ Switching virtualenv: mydefaultenv  [Python 3.4.3+]
30 $ # exited the project parent folder, so the virtualenv is now deactivated
31 ```
32 
33+##### rmvenv
34+
35 You can remove the virtual environment for a directory you are currently in using the `rmvenv`
36 helper function:
37 
38@@ -149,8 +157,11 @@ $ rmvenv
39 No .venv file in the current directory!
40 ```
41 
42-Setting a default virtualenv
43-----------------------------
44+Options
45+-------
46+
47+
48+#### Setting a default virtual environment
49 
50 If you want to set a default virtual environment then you can also export `AUTOSWITCH_DEFAULTENV` in
51 your `.zshrc` file.
52@@ -160,17 +171,20 @@ export AUTOSWITCH_DEFAULTENV="mydefaultenv"
53 antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
54 ```
55 
56-Options
57--------
58+#### Set verbosity when changing environments
59 
60-Right now the only option available is to prevent verbose messages from being displayed when moving
61-between directories. You can do this by setting `AUTOSWITCH_SILENT` to a non-empty value.
62+You can prevent verbose messages from being displayed when moving between directories. 
63+You can do this by setting `AUTOSWITCH_SILENT` to a non-empty value.
64 
65 
66 Security Warnings
67 -----------------
68 
69-zsh-autoswitch-virtualenv will warn you if you are not the owner of the `.venv` file found in a directory
70-you have navigated to. In addition to this, it will refuse to activate that virtual envionrment automatically.
71-This is a security measure that prevents other, potentially malicious users, from switching you to a virtual
72+zsh-autoswitch-virtualenv will warn you in the following situations:
73+
74+* You are not the owner of the `.venv` file found in a directory. It will refuse to activate that virtual envionrment automatically.
75+
76+* The `.venv` file has weak permissions. Zsh will warn you that you should change `.venv` file to have read only permissions if it is not set that way already.
77+
78+These are security measures that prevents other, potentially malicious users, from switching you to a virtual
79 environment you did not want to switch to.