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
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
|||
CmdExport::CmdExport ()
|
||||
{
|
||||
_keyword = "export";
|
||||
_usage = "task export [<filter>]";
|
||||
_usage = "task <filter> export";
|
||||
_description = STRING_CMD_EXPORT_USAGE;
|
||||
_read_only = true;
|
||||
_displays_id = true;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,7 +64,13 @@ 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 ())
|
||||
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 ();
|
||||
|
|
|
@ -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