This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Include this in your shell *rc file (e.g. .bashrc, .zshrc, etc). | |
| # Update the folder name to your convention. | |
| # This uses venv as the virtual environment name, but if you use .venv, change it in the script. | |
| # Auto-activate virtual environment for any project with a venv directory | |
| function chpwd() { | |
| # Function to find venv directory in current path or parent directories | |
| local find_venv() { | |
| local dir="$PWD" |