You can force a newline that doesn't execute with Alt+Enter (27 + 10). If you obey really simple rules (run it through a lexer and then bracket count) you'll be able to ensure that every command you send to Espruino does finish.
Or your other option is to just do Serial1.setConsole() to get the JS console out of the way, and then you can implement whatever you like on USB by creating a handler with USB.onData(...).
But I really don't think just implementing yet another CLI will help 99% of Espruino's users. It seems like several of the features you want could be implemented in Espruino itself, and then they'd be available to everyone regardless of their OS or what terminal they decided to use. There's already a command history by the way - or did you have something else in mind?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You can force a newline that doesn't execute with Alt+Enter (27 + 10). If you obey really simple rules (run it through a lexer and then bracket count) you'll be able to ensure that every command you send to Espruino does finish.
I don't think it does stop you implementing a nice CLI, as someone has already done with espruino-cli for node.
Or your other option is to just do
Serial1.setConsole()
to get the JS console out of the way, and then you can implement whatever you like on USB by creating a handler withUSB.onData(...)
.But I really don't think just implementing yet another CLI will help 99% of Espruino's users. It seems like several of the features you want could be implemented in Espruino itself, and then they'd be available to everyone regardless of their OS or what terminal they decided to use. There's already a command history by the way - or did you have something else in mind?