Task: Auto-activate Python Virtualenvs When Changing Directories
Task: Auto-activate Python Virtualenvs When Changing Directories: a task in Terminal-Lego-15k (Harbor dataset). Write a Zsh shell function that automatically activates a Python virtualenv when you cd into a directory containing a venv/ subdirectory, and automatically deactivates it when you leave…
The task
Write a Zsh shell function that automatically activates a Python virtualenv when you `cd` into a directory containing a `venv/` subdirectory, and automatically deactivates it when you leave that directory. The solution should be a self-contained script suitable for sourcing in `~/.zshrc`.
Part of PrimeIntellect/Terminal-Lego-15k.