feat(fish): migrate some utils to fish functions
This commit is contained in:
parent
5a73a7a9a2
commit
999805f16e
5 changed files with 22 additions and 5 deletions
|
|
@ -1,13 +0,0 @@
|
|||
function envsource
|
||||
if not set -q argv[1]
|
||||
set argv[1] ".env"
|
||||
end
|
||||
|
||||
echo "Using $argv[1] as input file"
|
||||
|
||||
for line in (grep -v '^\s*\(#\|$\)' $argv[1] | grep -E '^[A-Za-z_]+=[^#\n]+')
|
||||
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