fish-conf/functions/dotenv.fish
2021-04-28 16:49:35 +02:00

12 lines
222 B
Fish

function dotenv
# check if a .env exists
if test ! -e .env
echo ".env not found." > /dev/stderr
return 1
end
while read -d "=" name value
set -x -g $name $value
end < .env
end