bshell: initialise verbs and table formatter on start
This commit is contained in:
+8
-1
@@ -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 <stdio.h>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user