legacy-dotfiles/zsh/.zsh/functions/venv
2013-11-03 21:21:21 +01:00

15 lines
362 B
Bash

# -*- mode: sh; -*-
if [ "${#}" -eq 1 ]; then
local venv_activate="$HOME/.virtualenv/$1/bin/activate"
if [ -r "$venv_activate" ]; then
source $venv_activate
else
echo "$1 is not a know virtual environment"
fi
else
echo "Virtual environments: "
for itm in ~/.virtualenv/*; do
echo " $(basename $itm)"
done
fi