mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-16 07:39:56 +00:00
Add lua repl interface to redbean
You can now interact with the global web server state on the command line, which the web server is running. This supports Emacs shortcuts with history, readline parity, <tab> completions, plus hints. Enjoy!
This commit is contained in:
parent
f6b6204b9e
commit
a6b02ce5a6
24 changed files with 848 additions and 463 deletions
19
third_party/lua/lrepl.h
vendored
Normal file
19
third_party/lua/lrepl.h
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_LUA_LREPL_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_LUA_LREPL_H_
|
||||
#include "third_party/linenoise/linenoise.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int lua_loadline(lua_State *);
|
||||
void lua_l_print(lua_State *);
|
||||
void lua_initrepl(const char *);
|
||||
int lua_report(lua_State *, int);
|
||||
int lua_runchunk(lua_State *, int, int);
|
||||
void lua_l_message(const char *, const char *);
|
||||
char *lua_readline_hint(const char *, const char **, const char **);
|
||||
void lua_readline_completions(const char *, linenoiseCompletions *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_LUA_LREPL_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue