#### This is a custom shell script I wrote in order to ease my workflow when dealing with Python Virtual Environments. ## Installation Download the `activatevenv.plugin.sh` into your computer. ### oh-my-zsh 1. Download the script into `$ZSH_CUSTOM/plugins//activatevenv/`. See [oh-my-zsh Plugin Customization Wiki](https://github.com/ohmyzsh/ohmyzsh/wiki/Customization) ```sh # Use curl or download manually from https://git.io/JLBHr (mkdir activatevenv; cd activatevenv) && curl -L --url https://git.io/JLBHr --output ./activatevenv/activatevenv.plugin.zsh ```` 2. Edit your `~/.zshrc`: ```sh … # Add activatevenv to your list of plugins and restart the terminal. plugins=(... , activatevenv) … ``` ### Manually 1. Copy and paste the `activatevend.plugin.sh` script to the bottom of your `~/.bashrc` or `~/.zshrc` and restart your terminal. ## Usage Simply `cd` into a project directory with a python virtual environment setup (with any of these names: `venv/`, `.venv/`, `env` or `.env`), and the script will activate it automatically for you (just as you would do with `source ./venv/bin/activate`). If you are creating a new virtualenv, run `python -m ` in your root directory and to activate it manually call `activatevenv` (also when you cd back into your project folder it will automatically activate it).