mikaelmello / inquire

A Rust library for building interactive prompts
https://docs.rs/inquire
MIT License
1.93k stars 76 forks source link

"external_print" Functionality #235

Open plucia-mitre opened 6 months ago

plucia-mitre commented 6 months ago

I have a simple terminal application which needs to print logs to the console while simultaneously prompting for input (e.g. the user may still be typing their input or making their selection while new logs are a being printed). I've created an initial working prototype with Rustyline, but I'd really like the nicer interface that Inquire would give me. Rustyline provides a create_external_printer method which provides an easy way to asynchronously write messages / logs above the current prompt. There's an example of this here.

I'd love to see a similar API available in Inquire! Thanks for the great library!