Multiline code in terminal
Hi, folks!
Do you know the option/mode when I can feed multiline code into a terminal?
E.g.
for i=1:1:100 {
/// do one line
///do something else}Comments
use local routine. like:
<tab>/// do one line
<tab>///do something else
<tab>}
do a ;to run it
to edit/show your line use ZI, ZR, PRINT
ATTENTION: you need a REAL terminal.
WebTerm, Studio, .... just can process single lines as they are only Terminal SIMULATIONS using eXECUTE command
If you call routines or classes you should temporarily save your lines before execution
e.g. ZS temp
Oh. Or make a small program, which does the thing - multiline editor for terminal. very simple. Just to have an option copy-paste several lines of code and run it in terminal
exact!
ZS temp creates temp.int
See also this Editor Archaeology as long as you don't use WebTerminal.
or my new Terminal Multi-Line Command Editor
Not sure about ObjectScript terminal but PythonGateway includes Python shell with multiline support:

Cool! Wanted something like that for ObjectScript
I think you were waiting for this
Terminal Multi-Line Option
Wow. This is fast! Thanks Robert!
Need a zpm package ;)
Would you like us to post feature requests here, on GitHub, or not at all? ![]()
For example, I want to be able to go back and edit a previously entered line before execution ...
Pls. use GitHub.
That makes it easier to follow and complete
Terminal Multi-Line Command Editor will do it
In fact, It works!
Installation:
USER>zpm zpm: USER>install terminal-multiline [terminal-multiline] Reload START [terminal-multiline] Reload SUCCESS [terminal-multiline] Module object refreshed. [terminal-multiline] Validate START [terminal-multiline] Validate SUCCESS [terminal-multiline] Compile START [terminal-multiline] Compile SUCCESS [terminal-multiline] Activate START [terminal-multiline] Configure START [terminal-multiline] Configure SUCCESS [terminal-multiline] Activate SUCCESS zpm: USER>q
Usage with copy-n-paste from docs:
USER>d ^%zml
Entering multi line mode. Run with empty line. Stop with single "."
USER:zml:1> SET x=8
USER:zml:2> FOR { WRITE "Running loop x=",x,!
USER:zml:3> SET x=x-1
USER:zml:4> QUIT:x=3
USER:zml:5> }
USER:zml:6> WRITE "Next command after FOR code block"
USER:zml:7>
Running loop x=8
Running loop x=7
Running loop x=6
Running loop x=5
Running loop x=4
Next command after FOR code block
USER:zml:1>It works like a charm!
Bravo, @Robert Cemper!