mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Commands
- Implemented CmdHelp object that replaces the report.cpp longUsage function, and builds the output dynamically from other Command objects. This is also why the help text right now is very short, as only a few commands are migrated. - Obsoleted longUsage function. - Updated task.1 man page with 'execute' command details. - Modified command.lua sample to include command usage. - Removed "help" from old Context::dispatch, which means "help" is the first migrated command. - Added usage and description to all Cmd* objects. - Implemented Command::usage and Command::description as base class methods that simply return data that is specified by the derived classes.
This commit is contained in:
parent
afc97d566c
commit
bc756637da
15 changed files with 477 additions and 91 deletions
43
src/commands/CmdHelp.h
Normal file
43
src/commands/CmdHelp.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free Software
|
||||
// Foundation; either version 2 of the License, or (at your option) any later
|
||||
// version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program; if not, write to the
|
||||
//
|
||||
// Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor,
|
||||
// Boston, MA
|
||||
// 02110-1301
|
||||
// USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef INCLUDED_CMDHELP
|
||||
#define INCLUDED_CMDHELP
|
||||
|
||||
#include <string>
|
||||
#include <Command.h>
|
||||
|
||||
class CmdHelp : public Command
|
||||
{
|
||||
public:
|
||||
CmdHelp ();
|
||||
|
||||
bool implements (const std::string&);
|
||||
int execute (const std::string&, std::string&);
|
||||
};
|
||||
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
Loading…
Add table
Add a link
Reference in a new issue