added continuous mode support fix #3

If a command returns SHELLMATTA_CONTINUE all received data is passed to this command until it returns != SHELLMATTA_CONTINUE or a cancel is received
The data is passed stdin like and can be read byte by byte vie shellmatta_read
The stdin buffer is overwritten witch each new char
This commit is contained in:
prozessorkern
2020-03-22 21:27:18 +01:00
parent 17bb88d292
commit 5e84f1b022
7 changed files with 115 additions and 52 deletions

View File

@@ -366,6 +366,7 @@ void utils_terminateInput(shellmatta_instance_t *inst)
inst->cursor = 0u;
inst->stdinIdx = 0u;
inst->stdinLength = 0u;
inst->continuousCmd = NULL;
inst->write("\r\n", 2u);
inst->write(inst->prompt, strlen(inst->prompt));
}