|
|
@ -298,12 +298,12 @@ fn main() -> Result<()> {
|
|
|
|
if parts.len() > 0 {
|
|
|
|
if parts.len() > 0 {
|
|
|
|
let cmd = parts[0].to_string();
|
|
|
|
let cmd = parts[0].to_string();
|
|
|
|
let args = if parts.len() > 1 { parts[1..].to_vec() } else { vec![] };
|
|
|
|
let args = if parts.len() > 1 { parts[1..].to_vec() } else { vec![] };
|
|
|
|
debug!("◇ {}", cmd.clone());
|
|
|
|
debug!("◇ {} {}", cmd.clone(), args.join(" "));
|
|
|
|
match eval(cmd.clone(), args) {
|
|
|
|
match eval(cmd.clone(), args.clone()) {
|
|
|
|
Ok(true) => info!("▷ {}", cmd),
|
|
|
|
Ok(true) => info!("▷ {} {}", cmd, args.join(" ")),
|
|
|
|
Ok(false) => warn!("▷ {}", cmd),
|
|
|
|
Ok(false) => warn!("▷ {} {}", cmd, args.join(" ")),
|
|
|
|
Err(e) => {
|
|
|
|
Err(e) => {
|
|
|
|
error!("▷ {}: {}", cmd, e);
|
|
|
|
error!("▷ {} {} ● {}", cmd, args.join(" "), e);
|
|
|
|
println!("error: {}", e);
|
|
|
|
println!("error: {}", e);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -358,7 +358,7 @@ fn main() -> Result<()> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if event.ctrl && event.code == key::L {
|
|
|
|
if event.ctrl && event.code == key::L {
|
|
|
|
debug!("⎈ l: clear");
|
|
|
|
info!("» clear");
|
|
|
|
let text = "\x1b[2J\x1b[0;0H";
|
|
|
|
let text = "\x1b[2J\x1b[0;0H";
|
|
|
|
unsafe {
|
|
|
|
unsafe {
|
|
|
|
Error::check(Console::WriteConsoleA(stdout, text.as_bytes(), None, None))?;
|
|
|
|
Error::check(Console::WriteConsoleA(stdout, text.as_bytes(), None, None))?;
|
|
|
|