Document clear_screen functions
This commit is contained in:
parent
c42fe66985
commit
7d523dfcf0
|
@ -99,17 +99,22 @@ impl ArgsBuilder {
|
||||||
pub fn debug(&mut self, _: impl Into<bool>) -> &mut Self {
|
pub fn debug(&mut self, _: impl Into<bool>) -> &mut Self {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Clear the screen.
|
||||||
#[cfg(target_family = "windows")]
|
#[cfg(target_family = "windows")]
|
||||||
pub fn clear_screen() {
|
pub fn clear_screen() {
|
||||||
|
// TODO: clearscreen with powershell?
|
||||||
let _ = Command::new("cmd")
|
let _ = Command::new("cmd")
|
||||||
.arg("/c")
|
.arg("/c")
|
||||||
.arg("tput reset || cls")
|
.arg("tput reset || cls")
|
||||||
.status();
|
.status();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Clear the screen.
|
||||||
#[cfg(target_family = "unix")]
|
#[cfg(target_family = "unix")]
|
||||||
pub fn clear_screen() {
|
pub fn clear_screen() {
|
||||||
|
// TODO: clear screen via control codes instead
|
||||||
let _ = Command::new("tput").arg("reset").status();
|
let _ = Command::new("tput").arg("reset").status();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue