RTT console: add --line-mode for line-buffered input - #2022
Open
ccattuto wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The RTT viewer puts the terminal into raw mode (~ICANON & ~ECHO) and
forwards every keystroke to the target's down buffer as it is typed.
A target that parses line-based commands therefore sees each partially
typed line and acts on it, often resulting in errors.
Add an -l/--line-mode option that buffers the line on the host and
submits it only when Enter is pressed. Backspace/delete and ctrl-U edit
the pending line, and the line is terminated with whichever of CR or LF
the user actually typed.
The flag is off by default, so that targets driven by single keystrokes keep
working unchanged. When it is off, the bytes written to the down buffer and
the characters echoed locally are identical to before.