Commands
- Migrated handleVersion to CmdVersion.
This commit is contained in:
@@ -903,79 +903,6 @@ void handlePull (std::string& outs)
|
||||
"'pull.default.uri' entry in your .taskrc file.");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int handleVersion (std::string& outs)
|
||||
{
|
||||
int rc = 0;
|
||||
std::stringstream out;
|
||||
|
||||
// Create a table for the disclaimer.
|
||||
int width = context.getWidth ();
|
||||
ViewText disclaimer;
|
||||
disclaimer.width (width);
|
||||
disclaimer.add (Column::factory ("string", ""));
|
||||
disclaimer.set (disclaimer.addRow (), 0,
|
||||
"Taskwarrior may be copied only under the terms of the GNU General Public "
|
||||
"License, which may be found in the taskwarrior source kit.");
|
||||
|
||||
// Create a table for the URL.
|
||||
ViewText link;
|
||||
link.width (width);
|
||||
link.add (Column::factory ("string", ""));
|
||||
link.set (link.addRow (), 0,
|
||||
"Documentation for taskwarrior can be found using 'man task', 'man taskrc', "
|
||||
"'man task-tutorial', 'man task-color', 'man task-sync', 'man task-faq' or at "
|
||||
"http://taskwarrior.org");
|
||||
|
||||
Color bold ("bold");
|
||||
|
||||
out << "\n"
|
||||
<< (context.color () ? bold.colorize (PACKAGE) : PACKAGE)
|
||||
<< " "
|
||||
<< (context.color () ? bold.colorize (VERSION) : VERSION)
|
||||
<< " built for "
|
||||
|
||||
#if defined (DARWIN)
|
||||
<< "darwin"
|
||||
#elif defined (SOLARIS)
|
||||
<< "solaris"
|
||||
#elif defined (CYGWIN)
|
||||
<< "cygwin"
|
||||
#elif defined (OPENBSD)
|
||||
<< "openbsd"
|
||||
#elif defined (HAIKU)
|
||||
<< "haiku"
|
||||
#elif defined (FREEBSD)
|
||||
<< "freebsd"
|
||||
#elif defined (LINUX)
|
||||
<< "linux"
|
||||
#else
|
||||
<< "unknown"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
<< "-readline"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBLUA
|
||||
<< "-lua"
|
||||
#endif
|
||||
|
||||
<< "\n"
|
||||
<< "Copyright (C) 2006 - 2011 P. Beckingham, F. Hernandez.\n"
|
||||
#ifdef HAVE_LIBLUA
|
||||
<< "Portions of this software Copyright (C) 1994 – 2008 Lua.org, PUC-Rio.\n"
|
||||
#endif
|
||||
<< "\n"
|
||||
<< disclaimer.render ()
|
||||
<< "\n"
|
||||
<< link.render ()
|
||||
<< "\n";
|
||||
|
||||
outs = out.str ();
|
||||
return rc;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int handleShow (std::string& outs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user