gyscos / cursive

A Text User Interface library for the Rust programming language
MIT License
4.26k stars 243 forks source link

Let crossterm to initialyze with file for stdout #716

Closed mikem-zed closed 1 year ago

mikem-zed commented 1 year ago

Currently crossterm chooses /dev/tty by default for *nix however it may be required to initialize it with e.g. /dev/stdout

it can be used like this

let cur = cursive::CursiveRunnable::new(|| {
            cursive::backends::crossterm::Backend::init_with_stdout_file(std::fs::File::create(
                "/dev/stdout",
            )?)
        })
gyscos commented 1 year ago

Sorry for the delay - this looks great! Thanks!

gamma-delta commented 2 months ago

Do we have an ETA on when this is going to be put into an official release? I'm working on a crate that lets you control two terminals with one Cursive application (the normal terminal and another tty) but it needs this MR to be up on crates.io