Add shell function venv to activate python virtual environment
This commit is contained in:
parent
6b10b8dba3
commit
d9831c2115
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