xref: /NovaShell/src/shell/command/help.rs (revision dcc611d712e5611c796226bef3694bd991c34356)
1 pub struct Help {}
2 
3 impl Help {
4     pub fn shell_help(cmd: &str) {
5         match cmd {
6             "cd" => Self::shell_help_cd(),
7             "ls" => Self::shell_help_ls(),
8             "cat" => Self::shell_help_cat(),
9             "touch" => Self::shell_help_touch(),
10             "mkdir" => Self::shell_help_mkdir(),
11             "rm" => Self::shell_help_rm(),
12             "rmdir" => Self::shell_help_rmdir(),
13             "pwd" => Self::shell_help_pwd(),
14             "cp" => Self::shell_help_cp(),
15             "exec" => Self::shell_help_exec(),
16             "echo" => Self::shell_help_echo(),
17             "reboot" => Self::shell_help_reboot(),
18             "compgen" => Self::shell_help_compgen(),
19             "complete" => Self::shell_help_complete(),
20 
21             _ => {}
22         };
23     }
24 
25     fn shell_help_cd() {
26         println!("Usage: cd [directory]");
27     }
28 
29     fn shell_help_ls() {}
30 
31     fn shell_help_cat() {
32         println!("cat: cat file");
33     }
34 
35     fn shell_help_touch() {
36         println!("touch: touch file");
37     }
38 
39     fn shell_help_mkdir() {
40         println!("mkdir: mkdir directory");
41     }
42 
43     fn shell_help_rm() {
44         println!("rm: rm file");
45     }
46 
47     fn shell_help_rmdir() {
48         println!("rmdir: rmdir directory");
49     }
50 
51     fn shell_help_pwd() {}
52 
53     fn shell_help_cp() {
54         println!("cp: cp file file | directory");
55     }
56 
57     fn shell_help_exec() {
58         println!("exec: exec file");
59     }
60 
61     fn shell_help_echo() {
62         println!("echo: echo string");
63     }
64 
65     fn shell_help_reboot() {}
66 
67     fn shell_help_compgen() {}
68 
69     fn shell_help_complete() {}
70 }
71