mirror of https://github.com/vinc/moros.git
Allow empty command in shell
This commit is contained in:
parent
44c09504d3
commit
6f15403269
11
src/shell.rs
11
src/shell.rs
|
@ -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') => {
|
||||
|
|
Loading…
Reference in New Issue