-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
36 lines (30 loc) · 1.32 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.