Cross-platform terminal screen clearing library

Related tags

cli terminal screen clear cls
Overview

Crate release version Crate license: Apache 2.0 or MIT MSRV: 1.51.0 (breaking) CI status Uses Caretaker Maintainership

ClearScreen

Cross-platform terminal screen clearing library.

Tested with and tweaked for over 80 different terminals, multiplexers, SSH clients. See my research notes in the TERMINALS.md file.

Quick start

[dependencies]
clearscreen = "1.0.4"
clearscreen::clear().unwrap();
Issues
  • --clear not working on iterm2

    --clear not working on iterm2

    As it says --clear doesn't seem to be working at all.

    watchexec 1.16.0 iterm2 3.4.6

    I can also replicate on the main branch but I discovered that making the following change makes --clear work.

    diff --git a/lib/src/run.rs b/lib/src/run.rs
    index f1531c6..8c82b11 100644
    --- a/lib/src/run.rs
    +++ b/lib/src/run.rs
    @@ -174,6 +174,7 @@ impl ExecHandler {
         fn spawn(&self, ops: &[PathOp]) -> Result<()> {
             if self.args.clear_screen {
                 clearscreen::clear()?;
    +            println!();
             }
    
             debug!("Launching command");
    

    That seems super odd to me, but maybe it'll help figure out the issue.

    opened by noc7c9 5
Releases(v1.0.4)
Cross platform terminal library rust

Cross-platform Terminal Manipulation Library Crossterm is a pure-rust, terminal manipulation library that makes it possible to write cross-platform te

crossterm-rs 1.2k Jun 15, 2021
Cross-platform terminal screen clearing library

ClearScreen Cross-platform terminal screen clearing library. API documentation. Dual-licensed with Apache 2.0 and MIT. Uses Caretaker Maintainership.

null 9 May 22, 2021
Cross-platform Rust library for coloring and formatting terminal output

Coloring terminal output Documentation term-painter is a cross-platform (i.e. also non-ANSI terminals) Rust library for coloring and formatting termin

Lukas Kalbertodt 67 Mar 14, 2021
Alacritty - A fast, cross-platform, OpenGL terminal emulator

Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.

Alacritty 33.1k Jun 13, 2021
A cat(1) clone with syntax highlighting and Git integration.

A cat(1) clone with syntax highlighting and Git integration. Key Features • How To Use • Installation • Customization • Project goals, alternatives [中

David Peter 27.5k Jun 10, 2021
A cross-platform graphical process/system monitor with a customizable interface and a multitude of features

A cross-platform graphical process/system monitor with a customizable interface and a multitude of features. Supports Linux, macOS, and Windows. Inspired by both gtop and gotop.

Clement Tsang 2.1k Jun 7, 2021
A curated list of replacements for existing software written in Rust

Awesome Alternatives in Rust A curated list of replacements for existing software written in Rust. If you want to contribute, please read CONTRIBUTING

Takayuki Maeda 1.7k Jun 13, 2021
A Text User Interface library for the Rust programming language

Cursive Cursive is a TUI (Text User Interface) library for rust. It uses ncurses by default, but other backends are available. It allows you to build

Alexandre Bury 2.3k Jun 11, 2021
procs is a replacement for ps written in Rust.

procs is a replacement for ps written in Rust. Documentation quick links Features Platform Installation Usage Configuration Features Output by t

null 1.9k Jun 7, 2021
A command-line benchmarking tool

hyperfine 中文 A command-line benchmarking tool. Demo: Benchmarking fd and find: Features Statistical analysis across multiple runs. Support for arbitra

David Peter 7.9k Jun 9, 2021
yayagram - Play nonograms/picross in your terminal

yayagram is a puzzle game in which you fill out a grid with cells based on logic and number clues.

r00ster 13 Jun 11, 2021
Readline Implementation in Rust

RustyLine Readline implementation in Rust that is based on Antirez' Linenoise Supported Platforms Unix (tested on FreeBSD, Linux and macOS) Windows cm

Katsu Kawakami 766 Jun 13, 2021
Zellij is a workspace aimed at developers, ops-oriented people and anyone who loves the terminal

Zellij is a workspace aimed at developers, ops-oriented people and anyone who loves the terminal. At its core, it is a terminal multiplexer (similar to tmux and screen), but this is merely its infrastructure layer.

null 3.2k Jun 14, 2021
fastmod is a fast partial replacement for the codemod tool

fastmod is a fast partial replacement for codemod. Like codemod, it is a tool to assist you with large-scale codebase refactors, and it supports most of codemod's options.

Facebook Incubator 1.2k Jun 4, 2021