Add option -h to dump complete set of supported commands

Usage: ./proxmark3 -h
Display both offline & online commands, online commands are flagged.

git-svn-id: https://proxmark3.googlecode.com/svn/trunk@850 ef4ab9da-24cd-11de-8aaa-f3a34680c41f
This commit is contained in:
Philippe Teuwen 2014-03-26 22:08:55 +01:00
parent b27c190924
commit ae7aa73dd5
2 changed files with 47 additions and 1 deletions

View file

@ -21,8 +21,10 @@ void CmdsHelp(const command_t Commands[])
int i = 0;
while (Commands[i].Name)
{
if (!offline || Commands[i].Offline)
if (offline == 0 || Commands[i].Offline)
PrintAndLog("%-16s %s", Commands[i].Name, Commands[i].Help);
if (offline == 2 && !Commands[i].Offline)
PrintAndLog("%-14s @ %s", Commands[i].Name, Commands[i].Help);
++i;
}
}