How should output be done ideally?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 818
- Forks
- 249
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 30
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the examples that use println! and print!, then reproduce the prompt and output behavior described in the issue. Determine the desired output API and whether an output prompt is in scope; the work is done when the chosen behavior is implemented and the cursor no longer moves through an unwanted intermediate line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100