mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
init: Propagated args to CmdHelp
This commit is contained in:
parent
dc8453ab63
commit
2dcd2470c7
3 changed files with 6 additions and 4 deletions
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int CmdHelpUsage ()
|
||||
|
@ -44,7 +46,7 @@ int CmdHelpUsage ()
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int CmdHelp ()
|
||||
int CmdHelp (const std::vector <std::string>& args)
|
||||
{
|
||||
std::cout << "# help\n";
|
||||
return 0;
|
||||
|
|
|
@ -43,7 +43,7 @@ int CmdExport ();
|
|||
int CmdExtension ();
|
||||
int CmdGaps ();
|
||||
int CmdHelpUsage ();
|
||||
int CmdHelp ();
|
||||
int CmdHelp (const std::vector <std::string>&);
|
||||
int CmdLog (const std::vector <std::string>&, Log&);
|
||||
int CmdImport ();
|
||||
int CmdReport ();
|
||||
|
|
|
@ -192,14 +192,14 @@ int dispatchCommand (
|
|||
{
|
||||
// These signatures are æxpected to be all different, therefore no
|
||||
// command to fn mapping.
|
||||
if (closeEnough (allCommands[0], args[1], 2)) status = CmdHelp ();
|
||||
else if (closeEnough (allCommands[1], args[1], 2)) status = CmdClear ();
|
||||
if (closeEnough (allCommands[1], args[1], 2)) status = CmdClear ();
|
||||
else if (closeEnough (allCommands[2], args[1], 2)) status = CmdConfig ();
|
||||
else if (closeEnough (allCommands[3], args[1], 2)) status = CmdContinue ();
|
||||
else if (closeEnough (allCommands[4], args[1], 2)) status = CmdDefine (rules);
|
||||
else if (closeEnough (allCommands[5], args[1], 2)) status = CmdDiagnostics (database, log);
|
||||
else if (closeEnough (allCommands[6], args[1], 2)) status = CmdExport ();
|
||||
else if (closeEnough (allCommands[7], args[1], 2)) status = CmdGaps ();
|
||||
else if (closeEnough (allCommands[0], args[1], 2)) status = CmdHelp (args);
|
||||
else if (closeEnough (allCommands[8], args[1], 2)) status = CmdImport ();
|
||||
else if (closeEnough (allCommands[9], args[1], 2)) status = CmdLog (args, log);
|
||||
else if (closeEnough (allCommands[10], args[1], 2)) status = CmdReport ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue