File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ In the ``postmkvirtualenv`` script I have the following to create a
6767directory based on the project name, add that directory to the python
6868path and then cd into it::
6969
70- proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}' )
70+ proj_name=$(basename $VIRTUAL_ENV)
7171 mkdir $HOME/projects/$proj_name
7272 add2virtualenv $HOME/projects/$proj_name
7373 cd $HOME/projects/$proj_name
@@ -76,7 +76,7 @@ path and then cd into it::
7676In the ``postactivate `` script I have it set to automatically change
7777to the project directory when I use the workon command::
7878
79- proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}' )
79+ proj_name=$(basename $VIRTUAL_ENV)
8080 cd ~/projects/$proj_name
8181
8282Automatically Run workon When Entering a Directory
You can’t perform that action at this time.
0 commit comments