From 070a2be9698f76929661abb390d6d7cd28ba6fe8 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 24 May 2026 20:25:36 +0100 Subject: [PATCH] bshell: initialise verbs and table formatter on start --- bshell/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bshell/main.c b/bshell/main.c index fea7521..4aba04d 100644 --- a/bshell/main.c +++ b/bshell/main.c @@ -2,11 +2,13 @@ #include "compile.h" #include "debug.h" #include "file.h" +#include "format/format.h" #include "line-ed/line-ed.h" #include "parse/lex.h" #include "parse/parse.h" #include "parse/token.h" #include "runtime/runtime.h" +#include "verb.h" #include @@ -45,6 +47,9 @@ int main(int argc, const char **argv) { printf("B Shell " BSHELL_VERSION "\n"); + bshell_init_all_verbs(); + table_format_init(); + struct file *file = NULL; struct line_ed *ed = NULL; struct line_source *linesrc = NULL; @@ -91,7 +96,9 @@ int main(int argc, const char **argv) print_scriptblock(block, 0); 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);