Add shell function venv to activate python virtual environment
This commit is contained in:
parent
2c1919752e
commit
5e59c96b35
10
.zshrc
10
.zshrc
|
@ -79,6 +79,16 @@ man () {
|
||||||
command man "$@"
|
command man "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
venv() {
|
||||||
|
for d in venv/"$1" ve/"$1" ~/venv/"$1"
|
||||||
|
do
|
||||||
|
if [ -f "$d"/bin/activate ]
|
||||||
|
then
|
||||||
|
. "$d"/bin/activate
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
source ~/.znewterm
|
source ~/.znewterm
|
||||||
|
|
||||||
# assume pseudo terminals are from a "safe" terminal
|
# assume pseudo terminals are from a "safe" terminal
|
||||||
|
|
Loading…
Reference in New Issue