Control logging using key events

This commit is contained in:
eatmynerds 2024-12-05 01:33:44 -06:00 committed by BitSyndicate
parent 773b9c532b
commit bd3ec33392
Signed by untrusted user: bitsyndicate
GPG key ID: 443E4198D6BBA6DE
6 changed files with 94 additions and 52 deletions

View file

@ -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()
};
}