Created
June 11, 2017 13:44
-
-
Save danhper/de0d63a24fb6e799e7c3bd1ae69e6a62 to your computer and use it in GitHub Desktop.
Small fish function to source a file with a dotenv format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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