fish-conf/functions/dotenv.fish

12 lines
222 B
Fish
Raw Normal View History

2021-04-28 14:49:35 +00:00
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