Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
b0ad3d7c
Commit
b0ad3d7c
authored
Dec 20, 2014
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
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
Showing
1 changed file
with
49 additions
and
43 deletions
+49
-43
virtualenvwrapper.plugin.zsh
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
+49
-43
No files found.
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
View file @
b0ad3d7c
virtualenvwrapper
=
'virtualenvwrapper.sh'
virtualenvwrapper
=
'virtualenvwrapper.sh'
if
((
$+
commands[
$virtualenvwrapper
]
))
;
then
if
((
$+
commands[
$virtualenvwrapper
]
))
;
then
source
${${
virtualenvwrapper
}
:c
}
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
if
[[
!
$DISABLE_VENV_CD
-eq
1
]]
;
then
# Automatically activate Git projects's virtual environments based on the
# Automatically activate Git projects's virtual environments based on the
# directory name of the project. Virtual environment name can be overridden
# directory name of the project. Virtual environment name can be overridden
...
@@ -54,6 +59,7 @@ if (( $+commands[$virtualenvwrapper] )); then
...
@@ -54,6 +59,7 @@ if (( $+commands[$virtualenvwrapper] )); then
set
-A
chpwd_functions workon_cwd
set
-A
chpwd_functions workon_cwd
fi
fi
fi
fi
fi
else
else
print
"zsh virtualenvwrapper plugin: Cannot find
${
virtualenvwrapper
}
. Please install with
\`
pip install virtualenvwrapper
\`
."
print
"zsh virtualenvwrapper plugin: Cannot find
${
virtualenvwrapper
}
. Please install with
\`
pip install virtualenvwrapper
\`
."
fi
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