dots/configs/fish/functions/envsource.fish
2026-01-29 12:25:32 -03:00

7 lines
203 B
Fish

function envsource
for line in (cat $argv[1] | grep -v -e '^\([[:space:]]\|#.*\)*$')
set item (string split -m 1 '=' $line)
set -gx $item[1] $item[2]
echo "Exported key $item[1]"
end
end