From 7d523dfcf0f86964a18ce56013983fababbb453a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sun, 11 Apr 2021 01:02:44 +1200 Subject: [PATCH] Document clear_screen functions --- src/cli.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index a42351e..afa1fbf 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -99,17 +99,22 @@ impl ArgsBuilder { pub fn debug(&mut self, _: impl Into) -> &mut Self { self } +} +/// Clear the screen. #[cfg(target_family = "windows")] pub fn clear_screen() { +// TODO: clearscreen with powershell? let _ = Command::new("cmd") .arg("/c") .arg("tput reset || cls") .status(); } +/// Clear the screen. #[cfg(target_family = "unix")] pub fn clear_screen() { +// TODO: clear screen via control codes instead let _ = Command::new("tput").arg("reset").status(); }