Commit 07c84e68 authored by Charles Ferguson's avatar Charles Ferguson
Browse files

Fix the fish translations of the environment syntax.

The environment we got back from the 'local::lib' tool is being
translated into 'fish' commands so that the environment is set up
properly for the fish sell. However, it was broken. The expressions
that were given had incorrect escaping, so they ended up not working
properly, and the regular user environment was used instead.

The sed translations should now be fixed. Needs checking on OSX, but
it certainly works on Linux.
parent 68c0dc70
......@@ -554,12 +554,12 @@ function _perllib_setup
end
if [ "$var" = 'PATH' ]
eval (sed -E '/^\(export \|\)'$var'=/ ! d;
s/^\(export \|\)'$var'="\(.*\)"\(;\|\)/set -gx "$var" \2/;
eval (sed -E '/^(export |)'$var'=/ ! d;
s/^(export |)'$var'="(.*)"(;|)/set -gx "'$var'" \2/;
s/:/ /g' "$tmpfile")
else
eval (sed -E '/^\(export \|\)'$var'=/ ! d;
s/^\(export \|\)'$var'="\(.*\)"\(;\|\)/set -gx "$var" "\2"/;' "$tmpfile")
eval (sed -E '/^(export |)'$var'=/ ! d;
s/^(export |)'$var'="(.*)"(;|)/set -gx "$var" "\2"/;' "$tmpfile")
end
end
rm -f "$tmpfile"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment