Introduce WithRestoredIO (#307)

This function allow running a callback with the terminal hooks
temporarily uninstalled.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Vladislav Nepogodin
2022-01-19 16:38:39 +04:00
committed by GitHub
parent cd82fccde7
commit b4a655ec65
5 changed files with 93 additions and 14 deletions

View File

@@ -24,6 +24,9 @@ unreleased (development)
#### Component
- Add the `collapsible` component.
- Add the `ScreenInteractive::WithRestoredIO`. This decorates a callback. This
runs it with the terminal hooks temporarilly uninstalled. This is useful if
you want to execute command using directly stdin/stdout/sterr.
### Bug