From c77220af8c5a11070e456a72d6a935ef9a451dc5 Mon Sep 17 00:00:00 2001 From: hqm <13720409820@163.com> Date: Mon, 11 Oct 2021 21:54:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/ex_cmds/ex_cmds.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/extensions/ex_cmds/ex_cmds.c b/extensions/ex_cmds/ex_cmds.c index 5c55401..118d0a1 100644 --- a/extensions/ex_cmds/ex_cmds.c +++ b/extensions/ex_cmds/ex_cmds.c @@ -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 "xcmd.h" +#define HELP_RUN ("Run cmd. Usage: run cmd") + static int cmd_run(int argc, char* argv[]) { if(argc >= 2) @@ -9,14 +19,14 @@ static int cmd_run(int argc, char* argv[]) } else { - xcmd_print("usage: run \"cmd\"\n"); + xcmd_print("%s\r\n", HELP_RUN); } return 0; } static xcmd_t cmds[] = { - {"run", cmd_run, "run cmd", NULL}, + {"run", cmd_run, HELP_RUN, NULL}, }; void ex_cmds_init(void)