javascript-terminal
javascript-terminal copied to clipboard
shell scripts
Whats the best way to run a series of commands a la a shell script?
Given the scope of this project, unfortunately, there's not nice way to run a script of commands.
The command parser does support the && operator to chain commands, like echo "a" && echo "b".
Here's how I would approach this problem:
- Before calling
emulator.execute, do your own parsing ofcommandStrto check if it should be run as a series of commands - If so, chain the commands with
&&then callemulator.execute
Hope that helps!