Comment Comment by iokanuon That will break if there's comments in the file, or if any one of the variables' values contain spaces. You can use `set -a` to load .env into an existing shell instance instead: loadenv() { set -a source ./.env set +a } parent iokanuon 2 years ago