mirror of https://github.com/vinc/moros.git
Add help command
This commit is contained in:
parent
aa53e7e269
commit
b77422e346
|
@ -0,0 +1,15 @@
|
|||
use crate::{print, user};
|
||||
|
||||
pub fn main(_args: &[&str]) -> user::shell::ExitCode {
|
||||
print!("c[opy] <file> <file> Copy file from source to destination\n");
|
||||
print!("d[elete] <file> Delete file or empty directory\n");
|
||||
print!("e[dit] <file> Edit existing or new file\n");
|
||||
print!("h[elp] Display this text\n");
|
||||
print!("l[ist] <dir> List entries in directory\n");
|
||||
print!("m[ove] <file> <file> Move file from source to destination\n");
|
||||
print!("p[rint] <string> Print string to screen\n");
|
||||
print!("q[uit] Quit the shell\n");
|
||||
print!("r[ead] <file> Read file to screen\n");
|
||||
print!("w[rite] <file> Write file or directory\n");
|
||||
user::shell::ExitCode::CommandSuccessful
|
||||
}
|
|
@ -5,6 +5,7 @@ pub mod date;
|
|||
pub mod delete;
|
||||
pub mod editor;
|
||||
pub mod halt;
|
||||
pub mod help;
|
||||
pub mod hex;
|
||||
pub mod list;
|
||||
pub mod login;
|
||||
|
|
|
@ -191,7 +191,7 @@ impl Shell {
|
|||
"e" | "edit" => user::editor::main(&args),
|
||||
"f" | "find" => ExitCode::CommandUnknown,
|
||||
"g" | "go" => ExitCode::CommandUnknown,
|
||||
"h" | "help" => ExitCode::CommandUnknown,
|
||||
"h" | "help" => user::help::main(&args),
|
||||
"i" => ExitCode::CommandUnknown,
|
||||
"j" | "jump" => ExitCode::CommandUnknown,
|
||||
"k" | "kill" => ExitCode::CommandUnknown,
|
||||
|
|
Loading…
Reference in New Issue