Control logging using key events

This commit is contained in:
eatmynerds 2024-12-05 01:33:44 -06:00 committed by lily
parent c3316ba995
commit 728d908d4a
Signed by: lily
GPG key ID: 601F3263FBCBC4B9
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()
};
}