Comment Comment by iokanuon You could do that, and it'd still be POSIX-shell comptible: loadenv() { case "$-" in *a*) source ./.env ;; *) set -a; source ./.env; set +a ;; esac } Although I have yet to see a long shellscript utilise `set -a` globally :) parent iokanuon 2 years ago