promkit
promkit copied to clipboard
Add custom writer
Rationale
Give users a bit of freedom to choose std::io::Write.
One specific use case is to pipe stdout and keep promkit interactive by rendering promkit to stderr.
Limitation
One caveat is that piping stdout does not work for now because cross term::cursor::position() uses stdout by default (https://github.com/crossterm-rs/crossterm/issues/919).
Although it is not possible to pipe stdout due to the limitation of crossterm for the moment (hopefully fixed in near future), I believe this would be useful.
For custom use, I just added
termionto get cursor position