Allow full name in venv and break after first match

This commit is contained in:
Peter J. Holzer 2017-10-19 12:13:34 +02:00
parent 8ccf56f58a
commit 64ed1ceb5d
1 changed files with 2 additions and 1 deletions

3
.zshrc
View File

@ -80,11 +80,12 @@ man () {
} }
venv() { venv() {
for d in venv/"$1" ve/"$1" ~/venv/"$1" for d in venv/"$1" ve/"$1" ~/venv/"$1" "$1"
do do
if [ -f "$d"/bin/activate ] if [ -f "$d"/bin/activate ]
then then
. "$d"/bin/activate . "$d"/bin/activate
break
fi fi
done done
} }