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
67
67
directory based on the project name, add that directory to the python
68
68
path and then cd into it::
69
69
70
- proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}' )
70
+ proj_name=$(basename $VIRTUAL_ENV)
71
71
mkdir $HOME/projects/$proj_name
72
72
add2virtualenv $HOME/projects/$proj_name
73
73
cd $HOME/projects/$proj_name
@@ -76,7 +76,7 @@ path and then cd into it::
76
76
In the ``postactivate `` script I have it set to automatically change
77
77
to the project directory when I use the workon command::
78
78
79
- proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}' )
79
+ proj_name=$(basename $VIRTUAL_ENV)
80
80
cd ~/projects/$proj_name
81
81
82
82
Automatically Run workon When Entering a Directory
You can’t perform that action at this time.
0 commit comments