Expose lush global as a standard library (issue #26)

Register luaopen_lush() in stdlibs so the lush table is available as a
global. Users can now extend the shell by adding functions to
lush.builtins. The OP_LUSH VM access via integer keys is preserved.
This commit is contained in:
Cormac Shannon
2026-03-18 09:52:56 +00:00
parent 1766e40a68
commit 768de9fe8b
6 changed files with 161 additions and 24 deletions

2
lcmd.h
View File

@@ -23,4 +23,6 @@ int lushCmd_getenv (lua_State *L);
int lushCmd_setenv (lua_State *L);
int lushCmd_subcmd (lua_State *L);
LUAMOD_API int luaopen_lush (lua_State *L);
#endif