diff options
author | 2013-11-03 21:21:21 +0100 | |
---|---|---|
committer | 2013-11-03 21:21:21 +0100 | |
commit | 5c6cd059e8395d7f24d4b199e59c8c2f562dc438 (patch) | |
tree | 2e108e0724b5f5248de11c515312fa8c7c04ab4c /zsh/.zsh/functions/venv | |
parent | cca8771d855a3c8ba67bcb43a45967d9e4b6dd15 (diff) | |
download | dotfiles-5c6cd059e8395d7f24d4b199e59c8c2f562dc438.tar.gz dotfiles-5c6cd059e8395d7f24d4b199e59c8c2f562dc438.zip |
New stow hierarchy
Diffstat (limited to 'zsh/.zsh/functions/venv')
-rw-r--r-- | zsh/.zsh/functions/venv | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/zsh/.zsh/functions/venv b/zsh/.zsh/functions/venv new file mode 100644 index 0000000..03ec83d --- /dev/null +++ b/zsh/.zsh/functions/venv @@ -0,0 +1,15 @@ +# -*- 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 |