Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (30 sloc) 1.347 kb
Workit is a blatant rip off of Doug Hellmann's virtualenv wrapper:
http://www.doughellmann.com/projects/virtualenvwrapper/
I just wanted something that wasn't wrapped out virtualenv since most of my
projects are PHP or other type things.
The nice thing is that it allows you to setup a postactivate command which can
setup your environment for you. Below is a sample postactivate script which
performs several actions upon getting into the project.
> $ workit someproject
>
> #! /bin/zsh
>
> # variables needed for some script
> export JS_PATH="$PROJ_PATH/src";
>
> # define a custom function we can use to launch tests
> qunit() { chrome "http://project/javascript/tests/runtests.html" }
>
> # run ctags so vim is up to date when we start working on a project
> ctags -f $PROJ_PATH/tags -R $PROJ_PATH/src 2> /dev/null &!
>
> # use the reusable methods for start/stop serives. This project shuts down mysql
> # and starts up pgsql for use
> zmysql_stop
> zpgsql_start
You can also run a postdeactivate to shut down or clear settings from the
project. This is run whenver the command `deactivate` is run or you switch to
another project.
Projects are directories within the directories specified in the WORKIT_HOME.
You can create an array of locations to used. Any directory in these paths will
be used to complete/switch projects.
Jump to Line
Something went wrong with that request. Please try again.