mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Add Lua REPL mode and multiline edit function in the mode.
Typing "@repl" after Ctrl-t r, enter Lua REPL mode.
Typing "@exit" in REPL mode will return you to normal mode.
Note:
- the determination of continuation lines is not done automatically, and
if the end of a line is \, it is determined to be a continuation
instruction.
- In REPL mode, tio's main loop is blocked. (Ctrl-t q works.)
Example:
>> t = {1,2,3,4,5}
>> for _,v in ipairs(t) do\
>> print(v,"\r")\
>> end
Implementation improvements:
- Add tty_init() and script_interp_init() in order to only once
initialization.
- Fix script function to work without device_fd.
This commit is contained in:
parent
c25a379fbb
commit
266338a926
5 changed files with 155 additions and 37 deletions
|
|
@ -76,6 +76,7 @@ void stdout_configure(void);
|
|||
void stdin_configure(void);
|
||||
void tty_configure(void);
|
||||
void tty_reconfigure(void);
|
||||
void tty_init(void);
|
||||
int tty_connect(void);
|
||||
void tty_wait_for_device(void);
|
||||
void list_serial_devices(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue