Add -h/--help support to last commands

This commit is contained in:
Philippe Teuwen
2021-04-19 01:43:26 +02:00
parent d2246e6606
commit 11c7ead732
3 changed files with 46 additions and 4 deletions

View File

@@ -96,7 +96,17 @@ static void arg_add_t55xx_downloadlink(void *at[], uint8_t *idx, uint8_t show, u
}
static int CmdT55xxCloneHelp(const char *Cmd) {
(void)Cmd; // Cmd is not used so far
CLIParserContext *ctx;
CLIParserInit(&ctx, "lf t55xx clonehelp",
"Display a list of available commands for cloning specific techs on T5xx tags",
"lf t55xx clonehelp"
);
void *argtable[] = {
arg_param_begin,
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);
CLIParserFree(ctx);
PrintAndLogEx(NORMAL, "For cloning specific techs on T55xx tags, see commands available in corresponding LF sub-menus, e.g.:");
PrintAndLogEx(NORMAL, _GREEN_("lf awid clone"));
PrintAndLogEx(NORMAL, _GREEN_("lf destron clone"));