hotfix: allow empty line in term

This commit is contained in:
dr-frmr 2024-01-22 17:37:16 -03:00
parent e85cd8e188
commit f1441ac351
No known key found for this signature in database

View File

@ -21,6 +21,9 @@ struct TerminalState {
}
fn parse_command(state: &mut TerminalState, line: &str) -> anyhow::Result<()> {
if line.is_empty() {
return Ok(());
}
let (head, args) = line.split_once(" ").unwrap_or((line, ""));
let process = match state.aliases.get(head) {
Some(pid) => pid.clone(),