#line #screen #end #enter

alternate_screen_wrapper

enter end leave alternate screen in one line

5 unstable releases

Uses new Rust 2024

0.3.3 Sep 19, 2025
0.3.2 Aug 24, 2025
0.2.1 Aug 22, 2025
0.1.1 Oct 3, 2024
0.1.0 Aug 9, 2024

#2 in #end

Download history 11/week @ 2025-10-13 8/week @ 2025-10-20 1/week @ 2025-10-27

490 downloads per month

MIT license

6KB
107 lines

Cargo.toml

alternate_screen_wrapper = { version = "<current-version>", features = ["crossterm"] } # add "crossterm-bracketed-paste" to enable it

main.rs

fn main() {
    let alternate_screen = alternate_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 exit scope or panic.

Dependencies

~0–5MB
~110K SLoC