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 {
273273function mkvirtualenv_help {
274274 echo " Usage: mkvirtualenv [-i package] [-r requirements_file] [virtualenv options] env_name"
275275 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
276281 echo " -i package"
277282 echo
278283 echo " Install a package after the environment is created."
@@ -318,6 +323,9 @@ function mkvirtualenv {
318323 a=" ${in_args[$i]} "
319324 # echo "arg $i : $a"
320325 case " $a " in
326+ -a)
327+ i=$(( $i + 1 )) ;
328+ project=" ${in_args[$i]} " ;;
321329 -h)
322330 mkvirtualenv_help;
323331 return ;;
@@ -370,6 +378,11 @@ function mkvirtualenv {
370378 pip install $a
371379 done
372380
381+ if [ ! -z " $project " ]
382+ then
383+ setvirtualenvproject " " " $project "
384+ fi
385+
373386 virtualenvwrapper_run_hook " post_mkvirtualenv"
374387}
375388
You can’t perform that action at this time.
0 commit comments