changed heredoc support

now the input string is kept intact until the end of the input is reached
this enables the history buffer to store the complete command
Still broken:
history buffer with heredoc wont execute because the delimiter is not determined correctly
editing of multiline things
This commit is contained in:
prozessorkern
2019-07-30 23:55:12 +02:00
parent 280e512746
commit 16365f341e
3 changed files with 66 additions and 36 deletions

View File

@@ -102,7 +102,8 @@ typedef struct
uint32_t tabCounter; /**< counts the tabulator key presses */
uint32_t escapeCounter; /**< counts the characters of an escape seq */
char escapeChars[4u]; /**< buffer to save the escape characters */
char hereDelimiter[16u]; /**< heredoc delimiter */
uint32_t hereStartIdx; /**< heredoc start of "<<" */
uint32_t hereDelimiterIdx; /**< heredoc delimiter index in input */
uint32_t hereLength; /**< length of the heredoc delimiter */
bool echoEnabled; /**< if true the input is printed */
bool dirty; /**< dirty flag to show changes */