Yw, yes set -a
/ set +a
before and after sourcing a file in bash makes this easier. I found out when I needed this to quickly source an env
file used by a script that is launched and configured by systemd
like this:
EnvironmentFile=%h/.config/foo.env
Sometimes I’ve to run this script manually so I do this to source the same config:
set -a . /path/to/.config/foo.env set +a foo --bar