Compare commits
2 Commits
070fc5fb81
...
b916e4ac4d
Author | SHA1 | Date |
---|---|---|
Moritz Böhme | b916e4ac4d | |
Moritz Böhme | ef9706621b |
|
@ -64,6 +64,22 @@ in
|
|||
functions = {
|
||||
fish_greeting = "";
|
||||
cheat = "cht.sh $argv | bat -p";
|
||||
sourceenv = ''
|
||||
set -f envfile "$argv"
|
||||
if not test -f "$envfile"
|
||||
echo "Unable to load $envfile"
|
||||
return 1
|
||||
end
|
||||
printf "exported"
|
||||
while read line
|
||||
if not string match -qr '^#|^$' "$line"
|
||||
set item (string split -m 1 '=' $line)
|
||||
printf " $item[1]"
|
||||
set -gx "$item[1]" "$item[2]"
|
||||
end
|
||||
end < "$envfile"
|
||||
printf "\n"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue