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
5efe52d9
Commit
5efe52d9
authored
Oct 07, 2019
by
Michael C
Committed by
Marc Cornellà
Oct 07, 2019
Browse files
virtualenvwrapper: add README (#8226)
parent
5f066dab
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/virtualenvwrapper/README.md
0 → 100644
View file @
5efe52d9
# Virtualenvwrapper plugin
This plugin loads Python's
[
virtualenvwrapper
](
https://virtualenvwrapper.readthedocs.io/en/latest/
)
shell tools.
To use it, add
`virtualenvwrapper`
to the plugins array in your zshrc file:
```
zsh
plugins
=(
... virtualenvwrapper
)
```
## Usage
The plugin allows to automatically activate virtualenvs on cd into git repositories with a matching name:
```
➜ github $ cd ansible
(ansible) ➜ ansible git:(devel) $ cd docs
(ansible) ➜ docs git:(devel) $ cd ..
(ansible) ➜ ansible git:(devel) $ cd ..
➜ github $
```
We can override this by having a
`.venv`
file in the directory containing a differently named virtualenv:
```
➜ github $ cat ansible/.venv
myvirtualenv
➜ github $ cd ansible
(myvirtualenv) ➜ ansible git:(devel) $ cd ..
➜ github $
```
We can disable this behaviour by setting
`DISABLE_VENV_CD=1`
before Oh My Zsh is sourced:
```
zsh
DISABLE_VENV_CD
=
1
plugins
=(
... virtualenvwrapper
)
source
$ZSH
/oh-my-zsh.sh
```
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