HomeFreeBSD

lualoader: Add ability to intercept cli commands

Description

lualoader: Add ability to intercept cli commands

If we failed to execute the input line as pure lua, run the command through
parse for consistent argument parsing. Pass the parsed arguments through to
a global "cli_execute" written in Lua, which is expected to either handle it
or pass it back through to interp_builtin_cmd (via loader.command).

lua-handled cli commands will then exist as globals in whatever module they
most belong in, and invocations at the loader prompt will magically dispatch
to them if they exist.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D14450

Details

Provenance
kevansAuthored on
Reviewer
imp
Differential Revision
D14450: lualoader: Add ability to intercept cli commands
Parents
rS329643: Implement loader.command
Branches
Unknown
Tags
Unknown