3 ms·
This comment made me wonder if there's a tool out there akin to ~~autoenv~~ direnv [1], but that automatically activates a virtual environment when you cd into
by tedmiston 5y ago
This comment made me wonder if there's a tool out there akin to ~~autoenv~~ direnv [1], but that automatically activates a virtual environment when you cd into a directory with e.g., a poetry.lock.
Surprisingly, it seems like the answer today is no. But there's a little bash snippet that wraps cd to give us a start [2]. But just dropping `poetry shell` in an `.envrc` for direnv is better than nothing too.
[1]: https://github.com/direnv/direnv https://github.com/direnv/direnv
[2]: https://stackoverflow.com/a/50830617/149428 https://stackoverflow.com/a/50830617/149428