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 87fd586248
commit 2903ac6e5b
1 changed files with 2 additions and 1 deletions

3
.zshrc
View File

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