mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-27 15:52:28 +00:00
Implement basic canonical mode for Windows
The `cat` command now works properly, when run by itself on the bash command prompt. It's working beautifully so far, and is only missing a few keystrokes for clearing words and lines. Definitely works more well than the one that ships with WIN32 :-)
This commit is contained in:
parent
4825737509
commit
f26a280cda
36 changed files with 320 additions and 231 deletions
8
third_party/lua/lrepl.c
vendored
8
third_party/lua/lrepl.c
vendored
|
@ -347,8 +347,10 @@ void lua_initrepl(lua_State *L) {
|
|||
}
|
||||
lua_repl_linenoise = linenoiseBegin(prompt, 0, 1);
|
||||
lua_pop(L, 1); /* remove prompt */
|
||||
__replmode = true;
|
||||
if (isatty(2)) __replstderr = true;
|
||||
__ttyconf.replmode = true;
|
||||
if (isatty(2)) {
|
||||
__ttyconf.replstderr = true;
|
||||
}
|
||||
}
|
||||
lua_repl_unlock();
|
||||
}
|
||||
|
@ -356,7 +358,7 @@ void lua_initrepl(lua_State *L) {
|
|||
|
||||
void lua_freerepl(void) {
|
||||
lua_repl_lock();
|
||||
__replmode = false;
|
||||
__ttyconf.replmode = false;
|
||||
linenoiseEnd(lua_repl_linenoise);
|
||||
free(g_historypath);
|
||||
lua_repl_unlock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue