From 5e44cafb948be398c106de6d923db8b53bbbe6db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sat, 26 Jan 2019 15:19:42 +1300 Subject: [PATCH] [windows] Attempt to use tput to clear the screen In some situations, this may clear the screen better than a call to `cls`, and in all other cases `cls` is called anyway. May help #99 --- src/cli.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 1e90f8d..c6a3f7f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -28,7 +28,10 @@ pub struct Args { #[cfg(target_family = "windows")] pub fn clear_screen() { - let _ = Command::new("cmd").arg("/c").arg("cls").status(); + let _ = Command::new("cmd") + .arg("/c") + .arg("tput reset || cls") + .status(); } #[cfg(target_family = "unix")]