dev #3

Merged
justine merged 2 commits from dev into main 2023-03-04 20:26:03 +01:00
Showing only changes of commit 5743678e23 - Show all commits

View File

@ -127,12 +127,16 @@ pub mod shell {
return Err(CmdOutput::from_values(format!("Could not parse command {:?}", e), -1));
},
};
if parts.len() < 1 {
return Err(CmdOutput::from_values(String::from("Could not parse command"), -1));
}
let command = parts[0].as_str();
let args = Vec::from(&parts[1..]);
match command {
"cd" => {
change_dir(&args, &mut previous_command)?;
print!("\r\n");
},
"history" => {
let next = commands.peek().is_some();