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
Oh My Zsh
Commits
13e5afe8
Commit
13e5afe8
authored
Feb 10, 2015
by
Robby Russell
Browse files
Merge pull request #3164 from nailor/fix-deactivate-bug
virtualenvwrapper: Deactivate only if in virtualenv
parents
811f1f9e
833e6f59
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
View file @
13e5afe8
...
@@ -38,7 +38,7 @@ if (( $+commands[$virtualenvwrapper] )); then
...
@@ -38,7 +38,7 @@ if (( $+commands[$virtualenvwrapper] )); then
source
$ENV_NAME
/bin/activate
&&
export
CD_VIRTUAL_ENV
=
"
$ENV_NAME
"
source
$ENV_NAME
/bin/activate
&&
export
CD_VIRTUAL_ENV
=
"
$ENV_NAME
"
fi
fi
fi
fi
elif
[
$CD_VIRTUAL_ENV
]
;
then
elif
[
[
-n
$CD_VIRTUAL_ENV
&&
-n
$VIRTUAL_ENV
]
]
;
then
# We've just left the repo, deactivate the environment
# We've just left the repo, deactivate the environment
# Note: this only happens if the virtualenv was activated automatically
# Note: this only happens if the virtualenv was activated automatically
deactivate
&&
unset
CD_VIRTUAL_ENV
deactivate
&&
unset
CD_VIRTUAL_ENV
...
...
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