Skip to content

domrim/zsh-virtualenvwrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Virtualenvwrapper plugin

Extracted from oh-my-zsh

Original readme

This plugin loads Python's virtualenvwrapper shell tools.

To use it, add virtualenvwrapper to the plugins array in your zshrc file:

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:

DISABLE_VENV_CD=1
plugins=(... virtualenvwrapper)
source $ZSH/oh-my-zsh.sh

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages