runtime: move variable definition from runtime to individual scopes

This commit is contained in:
2026-06-20 15:09:10 +01:00
parent c2d3e05430
commit c262b53eab
7 changed files with 42 additions and 28 deletions
+3 -2
View File
@@ -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);
}