@@ -8,6 +8,11 @@ The end-user customization scripts are either *sourced* (allowing them
88to modify your shell environment) or *run * as an external program at
99the appropriate trigger time.
1010
11+ The global scripts applied to all environments should be placed in the
12+ directory named by :ref: `VIRTUALENVWRAPPER_HOOK_DIR
13+ <variable-VIRTUALENVWRAPPER_HOOK_DIR>`. The local scripts should be
14+ placed in the ``bin `` directory of the virtualenv.
15+
1116.. _scripts-get_env_details :
1217
1318get_env_details
@@ -17,7 +22,7 @@ get_env_details
1722 :Argument(s): env name
1823 :Sourced/Run: run
1924
20- ``$WORKON_HOME /get_env_details `` is run when ``workon `` is run with no
25+ ``$VIRTUALENVWRAPPER_HOOK_DIR /get_env_details `` is run when ``workon `` is run with no
2126arguments and a list of the virtual environments is printed. The hook
2227is run once for each environment, after the name is printed, and can
2328print additional information about that environment.
@@ -31,7 +36,7 @@ initialize
3136 :Argument(s): None
3237 :Sourced/Run: sourced
3338
34- ``$WORKON_HOME /initialize `` is sourced when ``virtualenvwrapper.sh ``
39+ ``$VIRTUALENVWRAPPER_HOOK_DIR /initialize `` is sourced when ``virtualenvwrapper.sh ``
3540is loaded into your environment. Use it to adjust global settings
3641when virtualenvwrapper is enabled.
3742
@@ -44,7 +49,7 @@ premkvirtualenv
4449 :Argument(s): name of new environment
4550 :Sourced/Run: run
4651
47- ``$WORKON_HOME /premkvirtualenv `` is run as an external program after
52+ ``$VIRTUALENVWRAPPER_HOOK_DIR /premkvirtualenv `` is run as an external program after
4853the virtual environment is created but before the current environment
4954is switched to point to the new env. The current working directory for
5055the script is ``$WORKON_HOME `` and the name of the new environment is
@@ -59,7 +64,7 @@ postmkvirtualenv
5964 :Argument(s): none
6065 :Sourced/Run: sourced
6166
62- ``$WORKON_HOME /postmkvirtualenv `` is sourced after the new environment
67+ ``$VIRTUALENVWRAPPER_HOOK_DIR /postmkvirtualenv `` is sourced after the new environment
6368is created and activated.
6469
6570.. _scripts-precpvirtualenv :
@@ -71,7 +76,7 @@ precpvirtualenv
7176 :Argument(s): name of original environment, name of new environment
7277 :Sourced/Run: run
7378
74- ``$WORKON_HOME /precpvirtualenv `` is run as an external program after
79+ ``$VIRTUALENVWRAPPER_HOOK_DIR /precpvirtualenv `` is run as an external program after
7580the source environment is duplicated and made relocatable, but before
7681the ``premkvirtualenv `` hook is run or the current environment is
7782switched to point to the new env. The current working directory for
@@ -87,7 +92,7 @@ postcpvirtualenv
8792 :Argument(s): none
8893 :Sourced/Run: sourced
8994
90- ``$WORKON_HOME /postcpvirtualenv `` is sourced after the new environment
95+ ``$VIRTUALENVWRAPPER_HOOK_DIR /postcpvirtualenv `` is sourced after the new environment
9196is created and activated.
9297
9398.. _scripts-preactivate :
@@ -99,7 +104,7 @@ preactivate
99104 :Argument(s): environment name
100105 :Sourced/Run: run
101106
102- The global ``$WORKON_HOME /preactivate `` script is run before the new
107+ The global ``$VIRTUALENVWRAPPER_HOOK_DIR /preactivate `` script is run before the new
103108environment is enabled. The environment name is passed as the first
104109argument.
105110
@@ -116,7 +121,7 @@ postactivate
116121 :Argument(s): none
117122 :Sourced/Run: sourced
118123
119- The global ``$WORKON_HOME /postactivate `` script is sourced after the
124+ The global ``$VIRTUALENVWRAPPER_HOOK_DIR /postactivate `` script is sourced after the
120125new environment is enabled. ``$VIRTUAL_ENV `` refers to the new
121126environment at the time the script runs.
122127
@@ -155,7 +160,7 @@ current environment is deactivated, and can be used to disable or
155160clear settings in your environment. ``$VIRTUAL_ENV `` refers to the old
156161environment at the time the script runs.
157162
158- The global ``$WORKON_HOME /predeactivate `` script is sourced before the
163+ The global ``$VIRTUALENVWRAPPER_HOOK_DIR /predeactivate `` script is sourced before the
159164current environment is deactivated. ``$VIRTUAL_ENV `` refers to the
160165old environment at the time the script runs.
161166
@@ -182,7 +187,7 @@ prermvirtualenv
182187 :Argument(s): environment name
183188 :Sourced/Run: run
184189
185- The ``$WORKON_HOME /prermvirtualenv `` script is run as an external
190+ The ``$VIRTUALENVWRAPPER_HOOK_DIR /prermvirtualenv `` script is run as an external
186191program before the environment is removed. The full path to the
187192environment directory is passed as an argument to the script.
188193
@@ -195,6 +200,6 @@ postrmvirtualenv
195200 :Argument(s): environment name
196201 :Sourced/Run: run
197202
198- The ``$WORKON_HOME /postrmvirtualenv `` script is run as an external
203+ The ``$VIRTUALENVWRAPPER_HOOK_DIR /postrmvirtualenv `` script is run as an external
199204program after the environment is removed. The full path to the
200205environment directory is passed as an argument to the script.
0 commit comments