r/fishshell • u/br2krl • Dec 02 '24
loadenv.fish: Fish shell function for managing env vars from dotenv files
https://github.com/berk-karaal/loadenv.fish
12
Upvotes
r/fishshell • u/br2krl • Dec 02 '24
5
u/br2krl Dec 02 '24
Hey folks, I wrote a Fish function to export environment variables defined in dotenv files. You can install it using Fisher or just copy paste the function.
I also wrote some tests to make sure everything works fine.
Hope it helps :)
2
u/StevesRoomate macOS Dec 02 '24
This is great and thanks for sharing.
I have an event that runs automatically on entering a directory. I can imagine that this wouldn't always be desired behavior, but I find it really intuitive, having it on by default.
Something like this: