[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
This commit is contained in:
Félix Saparelli 2019-01-26 15:19:42 +13:00
parent 6f473bcd87
commit 5e44cafb94
1 changed files with 4 additions and 1 deletions

View File

@ -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")]