forked from nonsensical-dev/zenyx-engine
Control logging using key events
This commit is contained in:
parent
773b9c532b
commit
bd3ec33392
6 changed files with 94 additions and 52 deletions
|
@ -1,6 +1,5 @@
|
|||
use super::COMMAND_LIST;
|
||||
use std::process::Command;
|
||||
use log::debug;
|
||||
|
||||
pub(crate) fn say_hello() {
|
||||
println!("Hello, World!");
|
||||
|
@ -18,10 +17,8 @@ pub(crate) fn exit() {
|
|||
pub(crate) fn clear() {
|
||||
println!("Clearing screen..., running command");
|
||||
let _result = if cfg!(target_os = "windows") {
|
||||
debug!("target_os is windows");
|
||||
Command::new("cmd").args(["/c", "cls"]).spawn()
|
||||
} else {
|
||||
debug!("target_os is unix");
|
||||
Command::new("clear").spawn()
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue