From 6fc35cb79a8a97408da899b52b0859e1662e2076 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 26 Feb 2016 18:24:56 -0500 Subject: eshld/eshrt: Lose all command substitutions in ctxsw --- (limited to 'eshld') diff --git a/eshld/eshrt.esh b/eshld/eshrt.esh index 3d86b79..14f634b 100644 --- a/eshld/eshrt.esh +++ b/eshld/eshrt.esh @@ -72,13 +72,12 @@ __fn_ctxsw() ${__fn_tu});; ?*) # Unset static variables and functions from previous TU. - case "$(eval "printf '%s' \ - \"\${__${__prev_tu}_static_vars}\"")" \ - in ?*) + eval "__val=\${__${__prev_tu}_static_vars}" + case "${__val}" in ?*) eval "unset \${__${__prev_tu}_static_vars}" ;; esac - for __fn in $(eval printf '%s' \ - "\"\${__${__prev_tu}_static_fns}\""); do + eval "__val=\${__${__prev_tu}_static_fns}" + for __fn in ${__val}; do unset -f "${__fn%:*}" done ;; esac @@ -88,8 +87,8 @@ __fn_ctxsw() # Set static variables and function for the current TU. eval "__val=\${__${__fn_tu}_static_var_vals}" eval "${__val}" - for __fn in $(eval printf '%s' \ - "\"\${__${__fn_tu}_static_fns}\""); do + eval "__val=\${__${__fn_tu}_static_fns}" + for __fn in ${__val}; do eval "${__fn%:*}() { ${__fn#*:}; }" done ;; esac -- cgit v0.9.1