Skip to content

Makes you forget that you have virtualenv's (if you use cd). Works in Zsh and Bash.

Notifications You must be signed in to change notification settings

RobertDeRose/virtualenv-autodetect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

virtualenv-autodetect

Makes you forget that you have virtualenv's (if you use cd). Works in Zsh and Bash.

Installation

Basic

Add this line to your .zshenv, .bashrc or .bash-profile:

source /path/to/virtualenv-autodetect.sh

Oh-My-Zsh

git clone [email protected]:RobertDeRose/virtualenv-autodetect.git $ZSH_CUSTOM/plugins/virtualenv-autodetect
sed -Ei 's/plugins=\((.*)\)/plugins=\(\1 virtualenv-autodetect\)/' $HOME/.zshrc

What it does

  • This will search for a Virtual Environment (VENV) to activate when you enter a directory or any of its descendants.
  • VENV directory is detected automatically by locating a bin/activate inside that contains the strings "source bin/activate"
  • An active VENV will be replaced with a deeper one if a descendant contains it's own VENV
  • The VENV will be deactivated automatically when changing to a directory that no longer has a parent to a VENV

Credit

Originally inspired and faintly based on https://gist.github.com/2211471 by https://github.com/egilewski/virtualenv-autodetect

About

Makes you forget that you have virtualenv's (if you use cd). Works in Zsh and Bash.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%