adding virtualenvwrapper

This commit is contained in:
Locojay 2011-05-24 13:47:21 -04:00
commit cc87e97de4
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,24 @@
DEFAULT_VIRTUALENV_WRAPPERS=(
"/usr/local/bin/virtualenvwrapper.sh" # Default install location
"/etc/bash_completion.d/virtualenvwrapper" # Ubuntu install location
)
for VIRTUALENV_WRAPPER in $DEFAULT_VIRTUALENV_WRAPPERS
do
if [[ -s "${VIRTUALENV_WRAPPER}" ]]; then
break
fi
done
if [[ ! -n "${VIRTUALENV_WRAPPER}" ]] && [[ -s "${DEFAULT_VIRTUALENV_WRAPPER}" ]]; then
VIRTUALENV_WRAPPER=${DEFAULT_VIRTUALENV_WRAPPER}
fi
if [[ -s "${VIRTUALENV_WRAPPER}" ]]; then
if [[ ! -n "${WORKON_HOME}" ]]; then
export WORKON_HOME=$HOME/.virtualenvs;
fi
if [[ ! -d ${WORKON_HOME} ]]; then
mkdir -p "${WORKON_HOME}"
fi
source "${VIRTUALENV_WRAPPER}";
fi

2
zshrc
View file

@ -22,7 +22,7 @@ MODE_INDICATOR="%{$fg_bold[cyan]%}-- CMD MODE -- $R"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git git-flow gem brew vi-mode pip osx syntax-highlighting extract autojump) plugins=(git git-flow gem brew vi-mode pip osx syntax-highlighting extract autojump virtualenvwrapper)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
# Customize to your needs... # Customize to your needs...