mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Help
- Made all the usage strings for the 'help' command consistent with the implementation and with visual alignment.
This commit is contained in:
parent
87bca169c5
commit
de481a7eba
37 changed files with 58 additions and 66 deletions
|
@ -40,7 +40,7 @@ extern Context context;
|
|||
CmdAdd::CmdAdd ()
|
||||
{
|
||||
_keyword = "add";
|
||||
_usage = "task add <modifications>";
|
||||
_usage = "task add <modifications>";
|
||||
_description = STRING_CMD_ADD_USAGE;
|
||||
_read_only = false;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -932,7 +932,7 @@ void Chart::calculateRates (std::vector <time_t>& sequence)
|
|||
CmdBurndownMonthly::CmdBurndownMonthly ()
|
||||
{
|
||||
_keyword = "burndown.monthly";
|
||||
_usage = "task burndown.monthly [<filter>]";
|
||||
_usage = "task <filter> burndown.monthly";
|
||||
_description = "Shows a graphical burndown chart, by month";
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -970,7 +970,7 @@ int CmdBurndownMonthly::execute (std::string& output)
|
|||
CmdBurndownWeekly::CmdBurndownWeekly ()
|
||||
{
|
||||
_keyword = "burndown.weekly";
|
||||
_usage = "task burndown.weekly [<filter>]";
|
||||
_usage = "task <filter> burndown.weekly";
|
||||
_description = "Shows a graphical burndown chart, by week";
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -1008,7 +1008,7 @@ int CmdBurndownWeekly::execute (std::string& output)
|
|||
CmdBurndownDaily::CmdBurndownDaily ()
|
||||
{
|
||||
_keyword = "burndown.daily";
|
||||
_usage = "task burndown.daily [<filter>]";
|
||||
_usage = "task <filter> burndown.daily";
|
||||
_description = "Shows a graphical burndown chart, by day";
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdCalendar::CmdCalendar ()
|
||||
{
|
||||
_keyword = "calendar";
|
||||
_usage = "task calendar [due|month year|year]";
|
||||
_usage = "task calendar [due|month year|year]";
|
||||
_description = "Shows a calendar, with due tasks marked.";
|
||||
_read_only = true;
|
||||
_displays_id = true;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdColor::CmdColor ()
|
||||
{
|
||||
_keyword = "colors";
|
||||
_usage = "task colors [sample | legend]";
|
||||
_usage = "task colors [sample | legend]";
|
||||
_description = STRING_CMD_COLOR_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -42,7 +42,7 @@ extern Context context;
|
|||
CmdColumns::CmdColumns ()
|
||||
{
|
||||
_keyword = "columns";
|
||||
_usage = "task columns";
|
||||
_usage = "task columns";
|
||||
_description = STRING_CMD_COLUMNS_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -98,7 +98,7 @@ int CmdColumns::execute (std::string& output)
|
|||
CmdCompletionColumns::CmdCompletionColumns ()
|
||||
{
|
||||
_keyword = "_columns";
|
||||
_usage = "task _columns";
|
||||
_usage = "task _columns";
|
||||
_description = STRING_CMD_COLUMNS_USAGE2;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdCompletionCommands::CmdCompletionCommands ()
|
||||
{
|
||||
_keyword = "_commands";
|
||||
_usage = "task _commands";
|
||||
_usage = "task _commands";
|
||||
_description = STRING_CMD_HCOMMANDS_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -77,7 +77,7 @@ int CmdCompletionCommands::execute (std::string& output)
|
|||
CmdZshCommands::CmdZshCommands ()
|
||||
{
|
||||
_keyword = "_zshcommands";
|
||||
_usage = "task _zshcommands";
|
||||
_usage = "task _zshcommands";
|
||||
_description = STRING_CMD_ZSHCOMMANDS_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdConfig::CmdConfig ()
|
||||
{
|
||||
_keyword = "config";
|
||||
_usage = "task config [name [value | '']]";
|
||||
_usage = "task config [name [value | '']]";
|
||||
_description = STRING_CMD_CONFIG_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -178,7 +178,7 @@ int CmdConfig::execute (std::string& output)
|
|||
CmdCompletionConfig::CmdCompletionConfig ()
|
||||
{
|
||||
_keyword = "_config";
|
||||
_usage = "task _config";
|
||||
_usage = "task _config";
|
||||
_description = STRING_CMD_HCONFIG_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -39,7 +39,7 @@ extern Context context;
|
|||
CmdCount::CmdCount ()
|
||||
{
|
||||
_keyword = "count";
|
||||
_usage = "task count [<filter>]";
|
||||
_usage = "task <filter> count";
|
||||
_description = STRING_CMD_COUNT_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -52,7 +52,7 @@ extern Context context;
|
|||
CmdDiagnostics::CmdDiagnostics ()
|
||||
{
|
||||
_keyword = "diagnostics";
|
||||
_usage = "task diagnostics";
|
||||
_usage = "task diagnostics";
|
||||
_description = STRING_CMD_DIAG_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdEdit::CmdEdit ()
|
||||
{
|
||||
_keyword = "edit";
|
||||
_usage = "task edit <ID>";
|
||||
_usage = "task <filter> edit";
|
||||
_description = "Launches an editor to let you modify all aspects of a task "
|
||||
"directly, therefore it is to be used carefully.";
|
||||
_read_only = false;
|
||||
|
|
|
@ -38,7 +38,7 @@ extern Context context;
|
|||
CmdExec::CmdExec ()
|
||||
{
|
||||
_keyword = "execute";
|
||||
_usage = "task execute <external command>";
|
||||
_usage = "task execute <external command>";
|
||||
_description = STRING_CMD_EXEC_USAGE;
|
||||
_read_only = false;
|
||||
_displays_id = true;
|
||||
|
|
|
@ -38,7 +38,7 @@ extern Context context;
|
|||
CmdExport::CmdExport ()
|
||||
{
|
||||
_keyword = "export";
|
||||
_usage = "task export [<filter>]";
|
||||
_usage = "task <filter> export";
|
||||
_description = STRING_CMD_EXPORT_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = true;
|
||||
|
|
|
@ -37,7 +37,7 @@ extern Context context;
|
|||
CmdHelp::CmdHelp ()
|
||||
{
|
||||
_keyword = "help";
|
||||
_usage = "task help";
|
||||
_usage = "task help";
|
||||
_description = "Displays this usage help text";
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -104,19 +104,6 @@ int CmdHelp::execute (std::string& output)
|
|||
view.set (row, 2, "Aliased to '" + alias->second + "'");
|
||||
}
|
||||
|
||||
/*
|
||||
row = view.addRow ();
|
||||
view.set (row, 1, "task ID /from/to/g");
|
||||
view.set (row, 2, "Performs substitution on the task description and "
|
||||
"annotations. The 'g' is optional, and causes "
|
||||
"substitutions for all matching text, not just the "
|
||||
"first occurrence.");
|
||||
|
||||
row = view.addRow ();
|
||||
view.set (row, 1, "task ID");
|
||||
view.set (row, 2, "Specifying an ID without a command invokes the 'info' command.");
|
||||
*/
|
||||
|
||||
output = "\n"
|
||||
+ view.render ()
|
||||
+ "\n"
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdHistoryMonthly::CmdHistoryMonthly ()
|
||||
{
|
||||
_keyword = "history.monthly";
|
||||
_usage = "task history.monthly [<filter>]";
|
||||
_usage = "task <filter> history.monthly";
|
||||
_description = STRING_CMD_HISTORY_USAGE_M;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -196,7 +196,7 @@ int CmdHistoryMonthly::execute (std::string& output)
|
|||
CmdHistoryAnnual::CmdHistoryAnnual ()
|
||||
{
|
||||
_keyword = "history.annual";
|
||||
_usage = "task history.annual [<filter>]";
|
||||
_usage = "task <filter> history.annual";
|
||||
_description = STRING_CMD_HISTORY_USAGE_A;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -347,7 +347,7 @@ int CmdHistoryAnnual::execute (std::string& output)
|
|||
CmdGHistoryMonthly::CmdGHistoryMonthly ()
|
||||
{
|
||||
_keyword = "ghistory.monthly";
|
||||
_usage = "task ghistory.monthly [<filter>]";
|
||||
_usage = "task <filter> ghistory.monthly";
|
||||
_description = STRING_CMD_GHISTORY_USAGE_M;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -540,7 +540,7 @@ int CmdGHistoryMonthly::execute (std::string& output)
|
|||
CmdGHistoryAnnual::CmdGHistoryAnnual ()
|
||||
{
|
||||
_keyword = "ghistory.annual";
|
||||
_usage = "task ghistory.annual [<filter>]";
|
||||
_usage = "task <filter> ghistory.annual";
|
||||
_description = STRING_CMD_GHISTORY_USAGE_A;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdIDs::CmdIDs ()
|
||||
{
|
||||
_keyword = "ids";
|
||||
_usage = "task ids [<filter>]";
|
||||
_usage = "task <filter> ids";
|
||||
_description = STRING_CMD_IDS_USAGE_RANGE;
|
||||
_read_only = true;
|
||||
_displays_id = true;
|
||||
|
@ -72,7 +72,7 @@ int CmdIDs::execute (std::string& output)
|
|||
CmdCompletionIds::CmdCompletionIds ()
|
||||
{
|
||||
_keyword = "_ids";
|
||||
_usage = "task _ids [<filter>]";
|
||||
_usage = "task <filter> _ids";
|
||||
_description = STRING_CMD_IDS_USAGE_LIST;
|
||||
_read_only = true;
|
||||
_displays_id = true;
|
||||
|
@ -108,7 +108,7 @@ int CmdCompletionIds::execute (std::string& output)
|
|||
CmdZshCompletionIds::CmdZshCompletionIds ()
|
||||
{
|
||||
_keyword = "_zshids";
|
||||
_usage = "task _zshids [<filter>]";
|
||||
_usage = "task <filter> _zshids";
|
||||
_description = STRING_CMD_IDS_USAGE_ZSH;
|
||||
_read_only = true;
|
||||
_displays_id = true;
|
||||
|
|
|
@ -44,7 +44,7 @@ extern Context context;
|
|||
CmdImport::CmdImport ()
|
||||
{
|
||||
_keyword = "import";
|
||||
_usage = "task import <file> [<file> ...]";
|
||||
_usage = "task import <file> [<file> ...]";
|
||||
_description = STRING_CMD_IMPORT_USAGE;
|
||||
_read_only = false;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -43,7 +43,7 @@ extern Context context;
|
|||
CmdInfo::CmdInfo ()
|
||||
{
|
||||
_keyword = "information";
|
||||
_usage = "task information <filter>";
|
||||
_usage = "task <filter> information";
|
||||
_description = STRING_CMD_INFO_USAGE;
|
||||
_read_only = true;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ extern Context context;
|
|||
CmdInstall::CmdInstall ()
|
||||
{
|
||||
_keyword = "install";
|
||||
_usage = "task install <extension> [<extension> ...]";
|
||||
_usage = "task install <extension> [<extension> ...]";
|
||||
_description = STRING_CMD_INSTALL_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern Context context;
|
|||
CmdLog::CmdLog ()
|
||||
{
|
||||
_keyword = "log";
|
||||
_usage = "task log <modifications>";
|
||||
_usage = "task log <modifications>";
|
||||
_description = STRING_CMD_LOG_USAGE;
|
||||
_read_only = false;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -38,7 +38,7 @@ extern Context context;
|
|||
CmdLogo::CmdLogo ()
|
||||
{
|
||||
_keyword = "logo";
|
||||
_usage = "task logo";
|
||||
_usage = "task logo";
|
||||
_description = STRING_CMD_LOGO_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern Context context;
|
|||
CmdMerge::CmdMerge ()
|
||||
{
|
||||
_keyword = "merge";
|
||||
_usage = "task merge URL";
|
||||
_usage = "task merge URL";
|
||||
_description = "Merges the specified undo.data file with the local data files.";
|
||||
_read_only = false;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -42,8 +42,7 @@ extern Context context;
|
|||
CmdModify::CmdModify ()
|
||||
{
|
||||
_keyword = "modify";
|
||||
_usage = "task <filter> modify <modifications>\n"
|
||||
"task <sequence> <modifications>";
|
||||
_usage = "task <filter> modify <modifications>";
|
||||
_description = std::string (STRING_CMD_MODIFY_USAGE1) +
|
||||
"\n" +
|
||||
STRING_CMD_MODIFY_USAGE2;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdProjects::CmdProjects ()
|
||||
{
|
||||
_keyword = "projects";
|
||||
_usage = "task projects [<filter>]";
|
||||
_usage = "task <filter> projects";
|
||||
_description = STRING_CMD_PROJECTS_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -154,7 +154,7 @@ int CmdProjects::execute (std::string& output)
|
|||
CmdCompletionProjects::CmdCompletionProjects ()
|
||||
{
|
||||
_keyword = "_projects";
|
||||
_usage = "task _projects [<filter>]";
|
||||
_usage = "task <filter> _projects";
|
||||
_description = STRING_CMD_PROJECTS_USAGE_2;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -42,7 +42,7 @@ extern Context context;
|
|||
CmdPull::CmdPull ()
|
||||
{
|
||||
_keyword = "pull";
|
||||
_usage = "task pull URL";
|
||||
_usage = "task pull URL";
|
||||
_description = STRING_CMD_PULL_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -42,7 +42,7 @@ extern Context context;
|
|||
CmdPush::CmdPush ()
|
||||
{
|
||||
_keyword = "push";
|
||||
_usage = "task push URL";
|
||||
_usage = "task push URL";
|
||||
_description = STRING_CMD_PUSH_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdReports::CmdReports ()
|
||||
{
|
||||
_keyword = "reports";
|
||||
_usage = "task reports";
|
||||
_usage = "task reports";
|
||||
_description = STRING_CMD_REPORTS_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdShell::CmdShell ()
|
||||
{
|
||||
_keyword = "shell";
|
||||
_usage = "task shell";
|
||||
_usage = "task shell";
|
||||
_description = STRING_CMD_SHELL_USAGE;
|
||||
_read_only = false;
|
||||
_displays_id = true;
|
||||
|
|
|
@ -43,7 +43,7 @@ extern Context context;
|
|||
CmdShow::CmdShow ()
|
||||
{
|
||||
_keyword = "show";
|
||||
_usage = "task show [all | substring]";
|
||||
_usage = "task show [all | substring]";
|
||||
_description = STRING_CMD_SHOW;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -45,7 +45,7 @@ extern Context context;
|
|||
CmdStatistics::CmdStatistics ()
|
||||
{
|
||||
_keyword = "stats";
|
||||
_usage = "task stats [<filter>]";
|
||||
_usage = "task <filter> stats";
|
||||
_description = STRING_CMD_STATS_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -43,7 +43,7 @@ extern Context context;
|
|||
CmdSummary::CmdSummary ()
|
||||
{
|
||||
_keyword = "summary";
|
||||
_usage = "task summary";
|
||||
_usage = "task <filter> summary";
|
||||
_description = STRING_CMD_SUMMARY_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -39,7 +39,7 @@ extern Context context;
|
|||
CmdSynch::CmdSynch ()
|
||||
{
|
||||
_keyword = "synchronize";
|
||||
_usage = "task synchronize";
|
||||
_usage = "task synchronize";
|
||||
_description = STRING_CMD_SYNCH_USAGE;
|
||||
_read_only = false;
|
||||
_displays_id = true;
|
||||
|
|
|
@ -42,7 +42,7 @@ extern Context context;
|
|||
CmdTags::CmdTags ()
|
||||
{
|
||||
_keyword = "tags";
|
||||
_usage = "task tags";
|
||||
_usage = "task <filter> tags";
|
||||
_description = STRING_CMD_TAGS_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -143,7 +143,7 @@ int CmdTags::execute (std::string& output)
|
|||
CmdCompletionTags::CmdCompletionTags ()
|
||||
{
|
||||
_keyword = "_tags";
|
||||
_usage = "task _tags";
|
||||
_usage = "task <filter> _tags";
|
||||
_description = STRING_CMD_COMTAGS_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -39,7 +39,7 @@ extern Context context;
|
|||
CmdTimesheet::CmdTimesheet ()
|
||||
{
|
||||
_keyword = "timesheet";
|
||||
_usage = "task timesheet [weeks]";
|
||||
_usage = "task timesheet [weeks]";
|
||||
_description = "Shows a weekly report of tasks completed and started.";
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -37,7 +37,7 @@ extern Context context;
|
|||
CmdUndo::CmdUndo ()
|
||||
{
|
||||
_keyword = "undo";
|
||||
_usage = "task undo";
|
||||
_usage = "task undo";
|
||||
_description = STRING_CMD_UNDO_USAGE;
|
||||
_read_only = false;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern Context context;
|
|||
CmdUrgency::CmdUrgency ()
|
||||
{
|
||||
_keyword = "_urgency";
|
||||
_usage = "task _urgency <IDs>";
|
||||
_usage = "task <filter> _urgency";
|
||||
_description = STRING_CMD_URGENCY_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -64,8 +64,14 @@ int CmdUrgency::execute (std::string& output)
|
|||
std::stringstream out;
|
||||
std::vector <Task>::iterator task;
|
||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||
out << format (STRING_CMD_URGENCY_RESULT, task->id, task->urgency ())
|
||||
<< "\n";
|
||||
if (task->id)
|
||||
out << format (STRING_CMD_URGENCY_RESULT,
|
||||
task->id, task->urgency ())
|
||||
<< "\n";
|
||||
else
|
||||
out << format (STRING_CMD_URGENCY_RESULT,
|
||||
task->get ("uuid"), task->urgency ())
|
||||
<< "\n";
|
||||
|
||||
output = out.str ();
|
||||
return 0;
|
||||
|
|
|
@ -43,7 +43,7 @@ extern Context context;
|
|||
CmdVersion::CmdVersion ()
|
||||
{
|
||||
_keyword = "version";
|
||||
_usage = "task version";
|
||||
_usage = "task version";
|
||||
_description = STRING_CMD_VERSION_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
@ -117,7 +117,7 @@ int CmdVersion::execute (std::string& output)
|
|||
CmdCompletionVersion::CmdCompletionVersion ()
|
||||
{
|
||||
_keyword = "_version";
|
||||
_usage = "task _version";
|
||||
_usage = "task _version";
|
||||
_description = STRING_CMD_VERSION_USAGE2;
|
||||
_read_only = true;
|
||||
_displays_id = false;
|
||||
|
|
|
@ -186,7 +186,7 @@ void Command::factory (std::map <std::string, Command*>& all)
|
|||
|
||||
c = new CmdCustom (
|
||||
*report,
|
||||
"task " + *report + " [<filter>]",
|
||||
"task <filter> " + *report,
|
||||
context.config.get ("report." + *report + ".description"));
|
||||
|
||||
all[c->keyword ()] = c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue