This commit is contained in:
hqm 2021-10-11 21:54:38 +08:00
parent 16df42ccd8
commit c77220af8c
1 changed files with 12 additions and 2 deletions

View File

@ -1,6 +1,16 @@
/*
* @Author: your name
* @Date: 2021-10-11 13:40:10
* @LastEditTime: 2021-10-11 13:41:15
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /xcmd/extensions/ex_cmds/ex_cmds.c
*/
#include "ex_cmds.h" #include "ex_cmds.h"
#include "xcmd.h" #include "xcmd.h"
#define HELP_RUN ("Run cmd. Usage: run cmd")
static int cmd_run(int argc, char* argv[]) static int cmd_run(int argc, char* argv[])
{ {
if(argc >= 2) if(argc >= 2)
@ -9,14 +19,14 @@ static int cmd_run(int argc, char* argv[])
} }
else else
{ {
xcmd_print("usage: run \"cmd\"\n"); xcmd_print("%s\r\n", HELP_RUN);
} }
return 0; return 0;
} }
static xcmd_t cmds[] = static xcmd_t cmds[] =
{ {
{"run", cmd_run, "run cmd", NULL}, {"run", cmd_run, HELP_RUN, NULL},
}; };
void ex_cmds_init(void) void ex_cmds_init(void)