summaryrefslogtreecommitdiffstats
path: root/eshtrans
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-28 16:44:58 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-28 16:50:58 (EST)
commitfdb62002bd6c52adf07167cddb8d2dfbb057f368 (patch)
tree72c768907f883b3d09f39d0c117b0201c33df158 /eshtrans
parent395886dfbad28cff608e48172d0a23e9f65836b7 (diff)
downloadeggshell-fdb62002bd6c52adf07167cddb8d2dfbb057f368.zip
eggshell-fdb62002bd6c52adf07167cddb8d2dfbb057f368.tar.gz
eggshell-fdb62002bd6c52adf07167cddb8d2dfbb057f368.tar.bz2
eshtranseshrt: Store local vars in eval'd table
Diffstat (limited to 'eshtrans')
-rw-r--r--eshtrans/eshrt/eshrtbegin.esh8
1 files changed, 4 insertions, 4 deletions
diff --git a/eshtrans/eshrt/eshrtbegin.esh b/eshtrans/eshrt/eshrtbegin.esh
index 9f7e59e..ef627d7 100644
--- a/eshtrans/eshrt/eshrtbegin.esh
+++ b/eshtrans/eshrt/eshrtbegin.esh
@@ -94,16 +94,16 @@ __fn_ctxsw()
case "${__prev_vars}" in ?*)
unset ${__prev_vars}
;; esac
- eval "${__fn_var_vals}"
+ for __var in ${__fn_vars}; do
+ eval "${__var}=\${__fn_vars_${__fn_name}__${__var}}"
+ done
}
__fn_update_vars()
{
unset IFS
for __var in ${__fn_vars}; do
- __val="$(eval "printf '%s' \"\${${__var}}\"" | \
- sed "s|'|'\\\\''|g;")"
- __fn_var_vals="${__fn_var_vals} ${__var}='${__val}'"
+ eval "__fn_vars_${__fn_name}__${__var}=\${${__var}}"
done
}