reedline
reedline copied to clipboard
How should output be done ideally?
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.
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.
We'll need APIs for both buffered and unbuffered output.