diff options
author | Tom Willemse | 2013-08-13 20:53:57 +0200 |
---|---|---|
committer | Tom Willemse | 2013-08-13 20:53:57 +0200 |
commit | 2a133f4a39b120cf89755a6222760e1d6c4a45ce (patch) | |
tree | aa5d3e6933072005da11fea6e21b9f4352a2f629 /.zsh/functions/venv | |
download | zsh-2a133f4a39b120cf89755a6222760e1d6c4a45ce.tar.gz zsh-2a133f4a39b120cf89755a6222760e1d6c4a45ce.zip |
Initial commit of my ZSH configuration in vcsh
Diffstat (limited to '.zsh/functions/venv')
-rw-r--r-- | .zsh/functions/venv | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.zsh/functions/venv b/.zsh/functions/venv new file mode 100644 index 0000000..03ec83d --- /dev/null +++ b/.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 |