mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
lib/python: lazily load the extremely slow virtualenvwrapper
This commit is contained in:
parent
3f7b1eb848
commit
f2dad51a2c
1 changed files with 4 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
function wo() {
|
function wo() {
|
||||||
[ -f './.venv' ] && workon `cat ./.venv`
|
[ "$VEW_SOURCED" ] || source "$VEW_PATH"
|
||||||
|
[ -f './.venv' ] && workon `cat ./.venv` || workon $1
|
||||||
|
export VEW_SOURCED=1
|
||||||
}
|
}
|
||||||
alias deact='deactivate'
|
alias deact='deactivate'
|
||||||
alias cdv='cd $WORKON_HOME'
|
alias cdv='cd $WORKON_HOME'
|
||||||
|
|
@ -8,4 +10,4 @@ function cdp () {
|
||||||
cd "$(python -c "import os.path as _, ${1}; \
|
cd "$(python -c "import os.path as _, ${1}; \
|
||||||
print _.dirname(_.realpath(${1}.__file__[:-1]))"
|
print _.dirname(_.realpath(${1}.__file__[:-1]))"
|
||||||
)"
|
)"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue