mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
adding virtualenvwrapper
This commit is contained in:
parent
fee569e159
commit
cc87e97de4
2 changed files with 25 additions and 1 deletions
24
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
Normal file
24
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
Normal 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
2
zshrc
|
|
@ -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/*)
|
||||
# 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
|
||||
# Customize to your needs...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue