Stop Manually Activating Python Virtual Environments!

4 months ago
2

I hate activating venvs, so I wrote some code to automatically detect and activate venvs via the current directory in fish (and zsh) shell. And then deactivate when I leave the context of a given venv. It triggers on a change in pwd so I can keep using all my favorite tools to CD around the filesystem (i.e. z) and it just works!

https://github.com/g0t4/dotfiles/blob/9d726b25415307a5566120ef97e982512ccbf010/fish/load_last/auto-venv-on-cd-specific.fish

https://github.com/g0t4/dotfiles/blob/9d726b25415307a5566120ef97e982512ccbf010/zsh/universals/3-last/auto-venv-on-cd-specific.zsh#L8

Loading comments...