Add command command

Initial commit to test commands API
This commit is contained in:
Paul Fariello
2018-03-21 18:00:11 +01:00
parent 82f77a9285
commit ca022ec75e
7 changed files with 89 additions and 0 deletions

View File

@@ -2298,6 +2298,21 @@ static struct cmd_t command_defs[] =
CMD_EXAMPLES(
"/export /path/to/output.csv",
"/export ~/contacts.csv")
},
{ "/command",
parse_args, 1, 1, NULL,
CMD_NOSUBFUNCS
CMD_MAINFUNC(cmd_command)
CMD_NOTAGS
CMD_SYN(
"/command <cmd>")
CMD_DESC(
"Execute an ad hoc command")
CMD_ARGS(
{ "<cmd>", "Command to be executed" })
CMD_EXAMPLES(
"/command ping")
}
};