runtime: move variable definition from runtime to individual scopes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <bshell/command/function.h>
|
||||
#include <bshell/runtime/pipeline.h>
|
||||
#include <bshell/runtime/runtime.h>
|
||||
#include <bshell/runtime/scope.h>
|
||||
#include <bshell/runtime/script-block.h>
|
||||
#include <bshell/status.h>
|
||||
#include <fx/collections/array.h>
|
||||
@@ -72,8 +73,8 @@ static enum bshell_status process_record(
|
||||
break;
|
||||
}
|
||||
|
||||
bshell_variable *var = bshell_runtime_define_var(
|
||||
rt,
|
||||
bshell_variable *var = bshell_runtime_scope_define_variable(
|
||||
bshell_runtime_get_current_scope(rt),
|
||||
fx_string_get_cstr(param));
|
||||
bshell_variable_set_value(var, *arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user