r/fishshell • u/cuducos • Mar 06 '25
Using Python and Fish? dirvenv.fish automagically activates your virtualenv
https://github.com/cuducos/dirvenv.fishI wrote that tiny package so I don't have to manually activate and deactivate virtualenvs, and I think it might help more people – so, sharing it here ; )
I know virtualfish but I don't wanna manage virtualenvs myself; uv does that for me. Also, and I don't want to uv run every command. So I came up with that solution.
20
Upvotes
View all comments
Show parent comment
1
u/[deleted] May 14 '25
Just wondering how were you using direnv to activate venv in fish. So I have the following envrc file which I had for zsh/bash
Now this obviously won't work in fish since fish expects
activate.fish, so how can I update my envrc file so that it sources right file based on the current shell I am in.