1 unstable release
0.0.1 | Jul 8, 2023 |
---|
#24 in #osdev
21 downloads per month
10KB
249 lines
simple-shell
A simple shell for no_std
Rust.
Usage
fn run_shell() -> ! {
let (print, read) = (|s: &str| print!(s), || None);
let mut shell = Shell::new(print, read);
commands.insert(
"help",
ShellCommand {
help: "print this help message",
func: |_, shell| {
shell.print_help_screen();
Ok(())
},
aliases: &["?", "h"],
},
);
// Also supports async
// shell.run_async().await;
shell.run()
}