summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Frank <justinpfrank@protonmail.com>2019-03-07 22:31:04 -0800
committerJustin Frank <justinpfrank@protonmail.com>2019-04-08 17:02:44 -0700
commit670f8192c8d68c33e42b95847edd0678f87ca39b (patch)
treea13d525ad26a9ea290fea640c8781b8af6eaa4bd
parentf732ea4efb13ced7055a7cc82d30c6cff0a558d3 (diff)
Set up command boilerplate for provide-module and require-module
-rw-r--r--src/commands.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/commands.cc b/src/commands.cc
index ef597f6f..3c50accb 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -2405,6 +2405,36 @@ const CommandDesc enter_user_mode_cmd = {
}
};
+const CommandDesc provide_module_cmd = {
+ "provide-module",
+ nullptr,
+ "provide-module [<switches>] <name> <cmds>: declares a module <name> provided by <cmds>",
+ ParameterDesc{
+ { { "override", { false, "allow overriding an existing module" } } },
+ ParameterDesc::Flags::None,
+ 2, 2
+ },
+ CommandFlags::None,
+ CommandHelper{},
+ CommandCompleter{},
+ [](const ParametersParser& parse, Context& context, const ShellContext&)
+ {
+ }
+};
+
+const CommandDesc require_module_cmd = {
+ "require-module",
+ nullptr,
+ "require-module <name>: ensures that <name> module has been loaded",
+ ParameterDesc{ {}, ParameterDesc::Flags::None, 1, 1 },
+ CommandFlags::None,
+ CommandHelper{},
+ CommandCompleter{},
+ [](const ParametersParser& parser, Context& context, const ShellContext&)
+ {
+ }
+};
+
}
void register_commands()
@@ -2470,6 +2500,8 @@ void register_commands()
register_command(fail_cmd);
register_command(declare_user_mode_cmd);
register_command(enter_user_mode_cmd);
+ register_command(provide_module_cmd);
+ register_command(require_module_cmd);
}
}