Closed thorhj closed 4 years ago
Although not the same, overwriting is currently possible via \b
control character.
Here's an example: https://github.com/Tyrrrz/CliFx/blob/3883c831e9b69005a15f3f54517baa70a972fa7e/CliFx/Utilities/ProgressTicker.cs#L22-L26
I'm a bit wary of adding these methods to IConsole
because I'm not entirely sure how they should be represented in VirtualConsole
.
Description
Sometimes you wish to overwrite previously entered output, e.g. when creating a loading bar or a spinner. This is not possible through the recommended
IConsole
instance, as it does not define contracts for controlling the cursor position.Suggested solution
Add the following signatures to
IConsole
:I suspect these have been left out of the interface because of the
VirtualConsole
implementation. Alternatively, a spinner class could be added to the framework similar toProgressReporter
.