reedline icon indicating copy to clipboard operation
reedline copied to clipboard

How should output be done ideally?

Open actuday6418 opened this issue 1 year ago • 1 comments

I see in the examples that the println! macro is used directly for output, but using this or even print! flushes stdout before printing the next prompt, and this doesn't look pleasant.

a

In the GIF, you can see the cursor move to the next line after printing from println! and then go down again after printing the next prompt. (Open GIF in a new tab if it isn't clear)

I think we should have an API for printing command outputs so there's no flush before the next prompt is printed. Maybe we could also have an output "prompt", which popular REPLs like ipython doo. 2024-09-28-171502_screenshot

actuday6418 avatar Sep 28 '24 11:09 actuday6418

We'll need APIs for both buffered and unbuffered output.

actuday6418 avatar Sep 29 '24 01:09 actuday6418