tool: Add envsource.fish to load .env files in fish

This commit is contained in:
John Colvin committed 2025-05-20 20:08:34 +00:00
1 parent f02f28e347
commit 2c8b9ee288
1 file changed
+9
+9
View File
@@ -0,0 +1,9 @@
# Usage: envsource <env_file>
function envsource --description "Source .env file"
for line in (cat $argv | grep -v '^#')
set item (string split -m 1 '=' $line)
set -gx $item[1] $item[2]
echo "Exported key $item[1]"
end
end