I would like to be able to create some files in a directory (e.g. *.env
) and then have my ZSH / BASH automatically load the environment variables defined in them / unload when I change the directory.
It would be best if a file ~/project/local.env
would define environment variables for all of its (nested) subfolders.
It should be gratis and work on Ubuntu 18.04.
.bashrc
file, or similar?". If I were you, I would prefer to do it with existing Linux commands if possible, rather than add a new software. If you agree, delete this question and ask on our Linux site. If they can't help, then come back here (but don't cross-post). Whichever you chose, I wish you good luck :-)