bshell: initialise verbs and table formatter on start

This commit is contained in:
2026-05-24 20:25:36 +01:00
parent 862028f5a8
commit 070a2be969
+8 -1
View File
@@ -2,11 +2,13 @@
#include "compile.h" #include "compile.h"
#include "debug.h" #include "debug.h"
#include "file.h" #include "file.h"
#include "format/format.h"
#include "line-ed/line-ed.h" #include "line-ed/line-ed.h"
#include "parse/lex.h" #include "parse/lex.h"
#include "parse/parse.h" #include "parse/parse.h"
#include "parse/token.h" #include "parse/token.h"
#include "runtime/runtime.h" #include "runtime/runtime.h"
#include "verb.h"
#include <stdio.h> #include <stdio.h>
@@ -45,6 +47,9 @@ int main(int argc, const char **argv)
{ {
printf("B Shell " BSHELL_VERSION "\n"); printf("B Shell " BSHELL_VERSION "\n");
bshell_init_all_verbs();
table_format_init();
struct file *file = NULL; struct file *file = NULL;
struct line_ed *ed = NULL; struct line_ed *ed = NULL;
struct line_source *linesrc = NULL; struct line_source *linesrc = NULL;
@@ -91,7 +96,9 @@ int main(int argc, const char **argv)
print_scriptblock(block, 0); print_scriptblock(block, 0);
fx_value result = bshell_runtime_eval_global(rt, block); fx_value result = bshell_runtime_eval_global(rt, block);
print_value(&result); if (result.v_type != NULL) {
format_value_default(&result, fx_stdout);
}
} }
parse_ctx_cleanup(&parse); parse_ctx_cleanup(&parse);