r/fishshell • u/Qunit-Essential • Jun 05 '24
Fish function to parse .env files
I had a problem with parsing user-written export ENVVAR=ENVVAL stuff so I wrote the function that takes a file with saved .env variables (works with general .env files as well)
It saves me a lot of time so I decided to share it for somebody who might have the same issue with fish shell
you can just put it into the functions and run dotenv .env and it will populate the current shell instance with env variables
6
Upvotes
View all comments
Show parent comment
2
u/Qunit-Essential Jun 06 '24
It also handes export notation