mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
🆕 cd命令
This commit is contained in:
23
user/apps/shell/cmd_help.c
Normal file
23
user/apps/shell/cmd_help.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include "cmd_help.h"
|
||||
#include <libc/stdio.h>
|
||||
struct help_table_item_t
|
||||
{
|
||||
void (*func)();
|
||||
};
|
||||
struct help_table_item_t help_table[] = {
|
||||
{shell_help_cd},
|
||||
};
|
||||
|
||||
static const int help_table_num = sizeof(help_table) / sizeof(struct help_table_item_t);
|
||||
|
||||
void shell_help()
|
||||
{
|
||||
printf("Help:\n");
|
||||
for (int i = 0; i < help_table_num; ++i)
|
||||
help_table[i].func();
|
||||
}
|
||||
|
||||
void shell_help_cd()
|
||||
{
|
||||
printf("Example of cd: cd [destination]\n");
|
||||
}
|
Reference in New Issue
Block a user