diff options
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | venvworkon.sh | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -23,9 +23,9 @@ When `workon` is called, venvs are created or loaded from the To change this behavior, set the `WORKON_HOME` environment variable before sourcing `venvworkon.sh`. -## Post-load script -If the file `$HOME/.venvs/<venv>/postload.sh` exists, it is -automatically sourced after the venv is loaded. This is useful +## Post-activate script +If the file `$HOME/.venvs/<venv>/postactivate.sh` exists, it is +automatically sourced after the venv is activated. This is useful to export environment variable such as `DJANGO_SETTINGS_MODULE`. ## Why bother using this diff --git a/venvworkon.sh b/venvworkon.sh index adca644..f6ac4ef 100755 --- a/venvworkon.sh +++ b/venvworkon.sh @@ -26,8 +26,8 @@ workon() { source "$envdir/bin/activate" - if [ -e "$envdir/postload.sh" ] + if [ -e "$envdir/postactivate.sh" ] then - source "$envdir/postload.sh" + source "$envdir/postactivate.sh" fi } |