diff options
-rw-r--r-- | bashast/libbashWalker.g | 2 | ||||
-rw-r--r-- | scripts/var_def.bash | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g index 42a8917..44cb4c2 100644 --- a/bashast/libbashWalker.g +++ b/bashast/libbashWalker.g @@ -650,7 +650,7 @@ execute_command[std::string& name, std::vector<std::string>& libbash_args] bool redirection = false; } @init { - if(name != "local" && name != "set" && name != "declare") + if(name != "local" && name != "set" && name != "declare" && name != "eval") current_scope.reset(new interpreter::local_scope(*walker)); } :var_def[true]* (redirect[out, err, in]{ redirection = true; })* { diff --git a/scripts/var_def.bash b/scripts/var_def.bash index b0224f1..fb6550d 100644 --- a/scripts/var_def.bash +++ b/scripts/var_def.bash @@ -85,12 +85,15 @@ echo $FOO005 function foo() { local -i foo=1 local -a bar=(1 2 3) + eval local foobar=23 echo $foo echo ${bar[@]} + echo foobar } foo bar=@ echo $bar +echo $foobar ARRAY11=(1 2 3 [10]=15) ARRAY11+=(1 [15]=20) echo ${ARRAY11[@]} |