From 76d959b27b28f07ce8525c0114ff273318caefd8 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Tue, 21 Nov 2017 00:55:58 -0500 Subject: [PATCH] Use `tput reset` to clear screen. Use `tput reset` instead of `clear` so that scrollback is cleared in addition to the currently visible portion of the terminal. --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 6568ccd..a59ebe7 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -29,7 +29,7 @@ pub fn clear_screen() { #[cfg(target_family = "unix")] pub fn clear_screen() { - let _ = Command::new("clear").status(); + let _ = Command::new("tput").arg("reset").status(); } #[allow(unknown_lints)]