File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,11 @@ function virtualenvwrapper_verify_active_environment {
273
273
function mkvirtualenv_help {
274
274
echo " Usage: mkvirtualenv [-i package] [-r requirements_file] [virtualenv options] env_name"
275
275
echo
276
+ echo " -a project_path"
277
+ echo
278
+ echo " Provide a full path to a project directory to associate with"
279
+ echo " the new environment."
280
+ echo
276
281
echo " -i package"
277
282
echo
278
283
echo " Install a package after the environment is created."
@@ -318,6 +323,9 @@ function mkvirtualenv {
318
323
a=" ${in_args[$i]} "
319
324
# echo "arg $i : $a"
320
325
case " $a " in
326
+ -a)
327
+ i=$(( $i + 1 )) ;
328
+ project=" ${in_args[$i]} " ;;
321
329
-h)
322
330
mkvirtualenv_help;
323
331
return ;;
@@ -370,6 +378,11 @@ function mkvirtualenv {
370
378
pip install $a
371
379
done
372
380
381
+ if [ ! -z " $project " ]
382
+ then
383
+ setvirtualenvproject " " " $project "
384
+ fi
385
+
373
386
virtualenvwrapper_run_hook " post_mkvirtualenv"
374
387
}
375
388
You can’t perform that action at this time.
0 commit comments