Skip to content

Instantly share code, notes, and snippets.

@danhper
Created June 11, 2017 13:44
Show Gist options
  • Save danhper/de0d63a24fb6e799e7c3bd1ae69e6a62 to your computer and use it in GitHub Desktop.
Save danhper/de0d63a24fb6e799e7c3bd1ae69e6a62 to your computer and use it in GitHub Desktop.
Small fish function to source a file with a dotenv format
function sourcenv -a file
cat $file | sed -e 's/\(^\|export \)/set -xg /' -e 's/=/ /' | source
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment