Add support for paging of output and max line length in interactive mode #1552
+168
−5
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.
This addresses Issue tactcomplabs#42 (and a little bit of tactcomplabs#44 ) by adding functionality for the debugger to pause long running (multiple screens, or long lines) outputs. Currently if the output of the ls command goes beyond 50 lines the user is greeted with the message:
--Type <RET> for more, q to quit, c to continue without paging--In addition, any lines longer than 160 characters are truncated with ...
This is accomplished by adding a new stream class
DebugStream- declared as a new member nameddoutinSimpleDebuggerIt is used as a drop in replacement forstd::coutand has an overloaded<<operator. The key difference is you must calldout << dresetafter each use to reset the stream state. No additional buffers are needed.DebugStreammay implement other stream modifiers that are passed in as function pointers.Along with this PR is a slight change to the CaptCrunch_Interactive test - an independent PR for that is also posted in the sst-ext-tests repo.