- Implemented stubbed Context::initialize2.
- Implemented combined command line.
- Migrated some code from Context::initialize to ::initialize2.
- Integrated ::initialize2 into the startup sequence.
- Implemented Context::dispatch2.
- Integrated ::dispatch2 into the run sequence.
- Implemented Context::updateXtermTitle.
- Added debug messages to new Command objects.
- Implemented CmdLogo, which implements the _logo command, for fun.
- Removed unnecessary base class overrides from Cmd* objects.
This commit is contained in:
Paul Beckingham 2011-05-14 12:18:39 -04:00
parent 02c2023dc4
commit 557440db0c
13 changed files with 215 additions and 141 deletions

58
src/commands/CmdExec.cpp Normal file
View file

@ -0,0 +1,58 @@
////////////////////////////////////////////////////////////////////////////////
// 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
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <CmdExec.h>
#include <Context.h>
extern Context context;
////////////////////////////////////////////////////////////////////////////////
CmdExec::CmdExec ()
{
}
////////////////////////////////////////////////////////////////////////////////
CmdExec::~CmdExec ()
{
}
////////////////////////////////////////////////////////////////////////////////
bool CmdExec::implements (const std::string& command_line) const
{
std::cout << "# CmdExec::implements\n";
return false;
}
////////////////////////////////////////////////////////////////////////////////
int CmdExec::execute (const std::string& commandLine, std::string& output)
{
std::cout << "# CmdExec::execute\n";
return 1;
}
////////////////////////////////////////////////////////////////////////////////