Created
June 11, 2014 00:45
-
-
Save mythmon/e990e0d57b6293fd7637 to your computer and use it in GitHub Desktop.
My venver .venv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=$(dirname $0) | |
v_activate() { | |
_OLD_PS1="$PS1" | |
export PS1="(venver)$PS1" | |
_OLD_PATH="$PATH" | |
export PATH="node_modules/.bin:$PATH" | |
r() { | |
npm start | |
} | |
s() { | |
node | |
} | |
t() { | |
npm test | |
} | |
} | |
v_deactivate() { | |
PATH=$_OLD_PATH | |
unset _OLD_PATH | |
PS1=$_OLD_PS1 | |
unset _OLD_PS1 | |
PATH=$_OLD_PATH | |
unset _OLD_PATH | |
unfunction r | |
unfunction s | |
unfunction t | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment