From de858643456ec6b866037f0b80497e1c1a523e59 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 26 Feb 2016 18:24:04 -0500 Subject: research: Lose all command substitutions in ctxsw --- (limited to 'research') diff --git a/research/research5.sh b/research/research5.sh index 90e475f..77a126d 100644 --- a/research/research5.sh +++ b/research/research5.sh @@ -48,8 +48,8 @@ __fn_ctxsw() ?*) # Unset static variables and functions from previous TU. eval "unset \${__${__prev_tu}_static_vars}" - 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 @@ -57,10 +57,10 @@ __fn_ctxsw() ${__prev_tu});; ?*) # Set static variables and function for the current TU. - eval "$(eval "printf '%s ' \ - \${__${__fn_tu}_static_var_vals}")" - for __fn in $(eval printf '%s' \ - "\"\${__${__fn_tu}_static_fns}\""); do + eval "__val=\${__${__fn_tu}_static_var_vals}" + eval "${__val}" + eval "__val=\${__${__fn_tu}_static_fns}" + for __fn in ${__val}; do eval "${__fn%:*}() { ${__fn#*:}; }" done ;; esac -- cgit v0.9.1