Allow empty command in shell

This commit is contained in:
Vincent Ollivier 2019-12-29 12:18:37 +01:00
parent 44c09504d3
commit 6f15403269
1 changed files with 6 additions and 5 deletions

View File

@ -42,21 +42,22 @@ pub fn key_handle(key: DecodedKey) {
*history_index = history.len();
}
match stdin.as_str() {
"" => {
},
"help" => {
print!("RTFM!");
print!("RTFM!\n");
},
"version" => {
print!("MOROS v{}", env!("CARGO_PKG_VERSION"));
print!("MOROS v{}\n", env!("CARGO_PKG_VERSION"));
},
"uptime" => {
print!("{:.6} seconds", clock::uptime());
print!("{:.6} seconds\n", clock::uptime());
},
_ => {
print!("?");
print!("?\n");
}
}
stdin.clear();
print!("\n");
print_prompt();
},
DecodedKey::Unicode('\x08') => {