Open RibomBalt opened 4 years ago
If using your idea, that would mean someone would have to press enter twice in order to execute a single line instruction? I don't like the idea that much. I though about implementing that but there's really no clean way of doing it. Trying to detect when instructions blocks are "complete" would likely introduce a ton of bugs.
Hello, in issue #3 you did a good job dealing with multiple-line inputs in selected scripts by cacheing them into a temp file. But in the interactive shell it's still not possible to run multiple-line scripts, especially those with
for
/if
/while
/try
etc. (v0.3.2)I have an idea: we can cache the inputs and execute them all when an empty line is input. To better explain this idea a python pseudo-code is presented below:
With this method, we can run multiple-line script interactively just like in original MATLAB shells, e.g. like this:
I'm not familiar with Typescript so I can't do it myself, but I suppose this can be done by reusing the method and codes you dealt with issue #3.
Best Wishes!