Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
b0ad3d7c
Commit
b0ad3d7c
authored
Dec 20, 2014
by
Robby Russell
Browse files
Merge pull request #3352 from benjaoming/virtualenvwrapper_workon_unset
Throw an error message when $WORKON_HOME is not set
parents
fe2ccb30
4b05e548
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
View file @
b0ad3d7c
virtualenvwrapper
=
'virtualenvwrapper.sh'
if
((
$+
commands[
$virtualenvwrapper
]
))
;
then
source
${${
virtualenvwrapper
}
:c
}
if
[[
"
$WORKON_HOME
"
==
""
]]
;
then
echo
"
\$
WORKON_HOME is not defined so ZSH plugin virtualenvwrapper will not work"
else
if
[[
!
$DISABLE_VENV_CD
-eq
1
]]
;
then
# Automatically activate Git projects's virtual environments based on the
# directory name of the project. Virtual environment name can be overridden
...
...
@@ -54,6 +59,7 @@ if (( $+commands[$virtualenvwrapper] )); then
set
-A
chpwd_functions workon_cwd
fi
fi
fi
else
print
"zsh virtualenvwrapper plugin: Cannot find
${
virtualenvwrapper
}
. Please install with
\`
pip install virtualenvwrapper
\`
."
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment