]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
make parser slightly more user friendly (default to 'help')
authoradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Thu, 4 Feb 2010 22:51:02 +0000 (22:51 +0000)
committeradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Thu, 4 Feb 2010 22:51:02 +0000 (22:51 +0000)
client/cmdmain.c
client/cmdparser.c

index 322e580640c96ab714e81f32f7d67ea81b593875..3cdcd08937a8497d0258432aacf5352e4aea616a 100644 (file)
@@ -20,7 +20,7 @@ static int CmdQuit(const char *Cmd);
 
 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"},
   {"exit",  CmdQuit,  1, "Exit program"},
   {"hf",    CmdHF,    1, "HF commands"},
@@ -135,4 +135,4 @@ void UsbCommandReceived(UsbCommand *UC)
     PrintAndLog("unrecognized command %08x\n", UC->cmd);
     break;
   }
-}
\ No newline at end of file
+}
index b91f2c9e86abd07665fc051384f1422fb43afc65..6fca29c2b4cc66841ba0564b3ec7949fd47dce51 100644 (file)
@@ -28,5 +28,6 @@ void CmdsParse(const command_t Commands[], const char *Cmd)
   if (Commands[i].Name)
     Commands[i].Parse(Cmd + len);
   else
-    PrintAndLog("Command not found");
+    // show help (always first in array) for selected hierarchy or if command not recognised
+    Commands[0].Parse("help");
 }
Impressum, Datenschutz