diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-02-27 22:55:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 22:55:30 +0100 |
commit | 18ee5dffdc57bb9219ee96b40da006704ac37df1 (patch) | |
tree | e1fe420cf18fa7a916d5d43c408c6f92ed33b62d /plugins/virtualenvwrapper/README.md | |
parent | d81cd753e0b3a845e8f3549da245dbad102a6e4c (diff) | |
parent | 368198b7616eb69b396de86d9ec4ff0f35bd72f0 (diff) | |
download | zsh-18ee5dffdc57bb9219ee96b40da006704ac37df1.tar.gz zsh-18ee5dffdc57bb9219ee96b40da006704ac37df1.tar.bz2 zsh-18ee5dffdc57bb9219ee96b40da006704ac37df1.zip |
Merge branch 'master' into clipboard
Diffstat (limited to 'plugins/virtualenvwrapper/README.md')
-rw-r--r-- | plugins/virtualenvwrapper/README.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/virtualenvwrapper/README.md b/plugins/virtualenvwrapper/README.md new file mode 100644 index 000000000..63eb58541 --- /dev/null +++ b/plugins/virtualenvwrapper/README.md @@ -0,0 +1,38 @@ +# 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 +``` |