mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Commands
- Implemented the ability to iterate over installed Command objects, to augment the '_commands' command. - Renamed verbosity tokens, to de-pluralize them.
This commit is contained in:
parent
14bea5e1b4
commit
902ed48243
8 changed files with 49 additions and 52 deletions
|
@ -99,10 +99,16 @@ int CmdLogo::execute (const std::string& commandLine, std::string& output)
|
|||
""
|
||||
};
|
||||
|
||||
if (!context.color ())
|
||||
throw std::string ("The _logo command requires that color support is enabled.");
|
||||
|
||||
std::string indent (context.config.getInteger ("indent.report"), ' ');
|
||||
output += optionalBlankLine ();
|
||||
|
||||
for (int line = 0; data[line][0]; ++line)
|
||||
{
|
||||
output += indent;
|
||||
|
||||
for (int c = 0; c < 14; ++c)
|
||||
{
|
||||
int value = (int) data[line][c];
|
||||
|
|
|
@ -57,9 +57,7 @@ Command::Command ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
Command::Command (const Command& other)
|
||||
{
|
||||
/*
|
||||
_minimum = other._minimum;
|
||||
*/
|
||||
// _all = other._all;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -67,9 +65,7 @@ Command& Command::operator= (const Command& other)
|
|||
{
|
||||
if (this != &other)
|
||||
{
|
||||
/*
|
||||
_name = other._name;
|
||||
*/
|
||||
// _all = other._all;
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
@ -78,15 +74,8 @@ Command& Command::operator= (const Command& other)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Command::operator== (const Command& other) const
|
||||
{
|
||||
// return _all == other._all;
|
||||
return false;
|
||||
/*
|
||||
return _name == other._name &&
|
||||
_minimum == other._minimum &&
|
||||
_maximum == other._maximum &&
|
||||
_wrap == other._wrap &&
|
||||
_just == other._just &&
|
||||
_sizing == other._sizing;
|
||||
*/
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -43,8 +43,6 @@ public:
|
|||
virtual bool read_only () const;
|
||||
virtual bool implements (const std::string&) const = 0;
|
||||
virtual int execute (const std::string&, std::string&) = 0;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue