Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspend output for some time to interact with the console #4

Closed
DCNick3 opened this issue May 29, 2023 · 1 comment
Closed

Suspend output for some time to interact with the console #4

DCNick3 opened this issue May 29, 2023 · 1 comment

Comments

@DCNick3
Copy link

DCNick3 commented May 29, 2023

While it is possible to use the stdout/stderr wrappers to output something to the console, for some use-cases this is not enough.

I want to prompt the user with a selection using dialoguer, which wants to have the real terminal writer (by having an AsRawFd trait bound on the Term constructor).

I think this can be ultimately accomplished by exposing the suspend function of the MultiProgress, allowing to hide progress bars during the user interaction (as suggested in console-rs/indicatif#158). This has a side-effect of blocking every other thing that tries to write to the output (including the tracing fmt layer if it was registered), but I think there's no real way to multiplex that..

@emersonford
Copy link
Owner

closed with v0.3.5, apologies it took a while for me to get around to this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants