add function to source .env files in fish
This commit is contained in:
parent
0c60392b1f
commit
fc134591c2
1 changed files with 7 additions and 0 deletions
7
configs/fish/functions/envsource.fish
Normal file
7
configs/fish/functions/envsource.fish
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
function envsource
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue