Add the cdp function.

This commit is contained in:
Steve Losh 2010-04-23 11:20:24 -04:00
commit 9cc2d0964b

View file

@ -3,3 +3,9 @@ function wo() {
} }
alias cdv='cd $WORKON_HOME' alias cdv='cd $WORKON_HOME'
function cdp () {
cd "$(python -c "import os.path as _, ${1}; \
print _.dirname(_.realpath(${1}.__file__[:-1]))"
)"
}