mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-19 04:49:38 -07:00
make parser slightly more user friendly (default to 'help')
This commit is contained in:
parent
92e592ce71
commit
c37d2e7078
2 changed files with 4 additions and 3 deletions
|
@ -20,7 +20,7 @@ static int CmdQuit(const char *Cmd);
|
||||||
|
|
||||||
static command_t CommandTable[] =
|
static command_t CommandTable[] =
|
||||||
{
|
{
|
||||||
{"help", CmdHelp, 1, "This help"},
|
{"help", CmdHelp, 1, "This help. Use '<command> help' for details of the following commands:\n"},
|
||||||
{"data", CmdData, 1, "Plot window / data buffer manipulation"},
|
{"data", CmdData, 1, "Plot window / data buffer manipulation"},
|
||||||
{"exit", CmdQuit, 1, "Exit program"},
|
{"exit", CmdQuit, 1, "Exit program"},
|
||||||
{"hf", CmdHF, 1, "HF commands"},
|
{"hf", CmdHF, 1, "HF commands"},
|
||||||
|
@ -135,4 +135,4 @@ void UsbCommandReceived(UsbCommand *UC)
|
||||||
PrintAndLog("unrecognized command %08x\n", UC->cmd);
|
PrintAndLog("unrecognized command %08x\n", UC->cmd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,5 +28,6 @@ void CmdsParse(const command_t Commands[], const char *Cmd)
|
||||||
if (Commands[i].Name)
|
if (Commands[i].Name)
|
||||||
Commands[i].Parse(Cmd + len);
|
Commands[i].Parse(Cmd + len);
|
||||||
else
|
else
|
||||||
PrintAndLog("Command not found");
|
// show help (always first in array) for selected hierarchy or if command not recognised
|
||||||
|
Commands[0].Parse("help");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue