diff options
author | 2013-02-15 15:37:42 +0100 | |
---|---|---|
committer | 2013-02-15 15:37:42 +0100 | |
commit | 934d02bcacaa5d0aef64a8edf7677f3b0c198666 (patch) | |
tree | edfc842025b5f8569973567b44ad62aa662f548f /.zsh/functions | |
parent | 06ff316f7f3b098504a6342651a79017cfb80ae7 (diff) | |
parent | ee34dfcc2c2fec53731b64afca03bb34dd80b2ba (diff) | |
download | dotfiles-934d02bcacaa5d0aef64a8edf7677f3b0c198666.tar.gz dotfiles-934d02bcacaa5d0aef64a8edf7677f3b0c198666.zip |
Merge remote-tracking branch 'ryuslash/master' into phoenix
Conflicts:
.config/awesome/rc.lua
.emacs.d/init.el
.emacs.d/init.org
.emacs.d/site-lisp/oni.el
Diffstat (limited to '.zsh/functions')
-rw-r--r-- | .zsh/functions/Makefile | 2 | ||||
-rw-r--r-- | .zsh/functions/venv | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/.zsh/functions/Makefile b/.zsh/functions/Makefile index 670c57c..baf5c6b 100644 --- a/.zsh/functions/Makefile +++ b/.zsh/functions/Makefile @@ -2,6 +2,6 @@ DESTDIR:=$(DESTDIR)/functions objects=chpwd_show_todo chpwd_update_git_vars env get_cnt line \ precmd_maybe_festival precmd_update_git_vars precmd_update_updates \ preexec_update_vars prompt prompt_git_info rprompt \ - update_current_git_vars welcome + update_current_git_vars welcome venv include ../../dotfiles.mk 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 |