summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Dalos-cli.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc
index acc7ea3..5c7cc8a 100644
--- a/src/Dalos-cli.cc
+++ b/src/Dalos-cli.cc
@@ -5,6 +5,7 @@
#include <Input.h>
#include <BStdIO.h>
#include "BReadline.h"
+#include "LuaLoad.h"
using namespace Balau;
@@ -36,6 +37,16 @@ static void showhelp(const char * binname, bool longhelp) {
);
}
+namespace {
+
+class DalosInit : public LuaExecCell {
+ virtual void run(Lua & L) override {
+ registerLuaLoad(L);
+ }
+};
+
+};
+
void MainTask::Do() {
std::list<String> execs;
bool interactive = false;
@@ -69,6 +80,12 @@ void MainTask::Do() {
}
}
+ {
+ DalosInit dalosInit;
+ dalosInit.exec(luaMainTask);
+ dalosInit.throwError();
+ }
+
while (optind < argc) {
todo = true;
IO<Input> file(new Input(argv[optind++]));