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:
Justine Tunney 2022-04-16 20:29:08 -07:00
parent f6b6204b9e
commit a6b02ce5a6
24 changed files with 848 additions and 463 deletions

View file

@ -23,11 +23,10 @@
#include "libc/calls/termios.internal.h"
#include "libc/dce.h"
#include "libc/intrin/asan.internal.h"
#include "libc/intrin/nomultics.internal.h"
#include "libc/sysv/consts/termios.h"
#include "libc/sysv/errfuns.h"
extern bool __nomultics;
int ioctl_tcsets_nt(int, uint64_t, const struct termios *);
static int ioctl_tcsets_metal(int fd, uint64_t request,
@ -85,7 +84,9 @@ int ioctl_tcsets(int fd, uint64_t request, ...) {
rc = einval();
}
if (rc != -1) {
__nomultics = !(tio->c_oflag & OPOST);
if (__nomultics == 0 || __nomultics == 1) {
__nomultics = !(tio->c_oflag & OPOST);
}
}
STRACE("ioctl_tcsets(%d, %p, %p) → %d% m", fd, request, tio, rc);
return rc;