#screen #enter #leave #end #line #alternate-screen

alternate_screen_wrapper

enter end leave alternate screen in one line

2 releases

0.1.1 Oct 3, 2024
0.1.0 Aug 9, 2024

#354 in Command-line interface

Download history 28/week @ 2024-10-05 15/week @ 2024-10-12 2/week @ 2024-10-19 4/week @ 2024-11-02 6/week @ 2024-11-16 2/week @ 2024-11-23 8/week @ 2024-12-07 1/week @ 2024-12-14 21/week @ 2024-12-28 35/week @ 2025-01-04 16/week @ 2025-01-11 6/week @ 2025-01-18

78 downloads per month

MIT license

4KB
50 lines

Cargo.toml

alternate_screen_wraper = { version = "<current-version>", features = "crossterm" } # or other backand

main.rs

fn main() {
    let alternate_screen = alternater_screen_wrapper::AlternateScreen::enter();
    // ..do some work
    let printable = // do other work
    // 
    drop(alternate_screen);
    println!("{printable}"); // it works
}

You can don't call drop manually. It will be dropped automatically when you exiting scope or panicing.

Dependencies

~0–8.5MB
~85K SLoC