fix: loadenv cant handle var value with special char

This commit is contained in:
Klesh Wong 2021-11-19 10:59:58 +08:00
parent 642f0d29d4
commit 2884cef180

View File

@ -88,7 +88,8 @@ if status is-interactive
if string match -q '#*' $line if string match -q '#*' $line
continue continue
end end
eval export $line set pair (string split -m 1 '=' -- $line)
eval "set -gx $pair[1] \"$pair[2]\""
end < $argv[1] end < $argv[1]
end end
@ -97,5 +98,6 @@ if status is-interactive
loadenv .env loadenv .env
end end
end end
readenv
end end