mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CmdCommands: Added command description column
- Shrunk the default widths of all the columns, for better spacing.
This commit is contained in:
parent
70b252f280
commit
28d872dd31
18 changed files with 71 additions and 68 deletions
|
@ -51,7 +51,7 @@ CmdCommands::CmdCommands ()
|
||||||
_accepts_filter = false;
|
_accepts_filter = false;
|
||||||
_accepts_modifications = false;
|
_accepts_modifications = false;
|
||||||
_accepts_miscellaneous = false;
|
_accepts_miscellaneous = false;
|
||||||
_category = Command::Category::interrogator;
|
_category = Command::Category::metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -68,6 +68,7 @@ int CmdCommands::execute (std::string& output)
|
||||||
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_FILTER));
|
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_FILTER));
|
||||||
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_MODS));
|
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_MODS));
|
||||||
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_MISC));
|
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_MISC));
|
||||||
|
view.add (Column::factory ("string.left", STRING_COLUMN_LABEL_DESC));
|
||||||
|
|
||||||
Color label (context.config.get ("color.label"));
|
Color label (context.config.get ("color.label"));
|
||||||
view.colorHeader (label);
|
view.colorHeader (label);
|
||||||
|
@ -98,16 +99,18 @@ int CmdCommands::execute (std::string& output)
|
||||||
view.set (row, 4, "GC");
|
view.set (row, 4, "GC");
|
||||||
|
|
||||||
if (command.second->uses_context ())
|
if (command.second->uses_context ())
|
||||||
view.set (row, 5, "Context");
|
view.set (row, 5, "Ctxt");
|
||||||
|
|
||||||
if (command.second->accepts_filter ())
|
if (command.second->accepts_filter ())
|
||||||
view.set (row, 6, "Filter");
|
view.set (row, 6, "Filt");
|
||||||
|
|
||||||
if (command.second->accepts_modifications ())
|
if (command.second->accepts_modifications ())
|
||||||
view.set (row, 7, "Modifications");
|
view.set (row, 7, "Mods");
|
||||||
|
|
||||||
if (command.second->accepts_miscellaneous ())
|
if (command.second->accepts_miscellaneous ())
|
||||||
view.set (row, 8, "Args");
|
view.set (row, 8, "Misc");
|
||||||
|
|
||||||
|
view.set (row, 9, command.second->description ());
|
||||||
}
|
}
|
||||||
|
|
||||||
output = optionalBlankLine ()
|
output = optionalBlankLine ()
|
||||||
|
|
|
@ -47,7 +47,7 @@ CmdCount::CmdCount ()
|
||||||
_accepts_filter = true;
|
_accepts_filter = true;
|
||||||
_accepts_modifications = false;
|
_accepts_modifications = false;
|
||||||
_accepts_miscellaneous = false;
|
_accepts_miscellaneous = false;
|
||||||
_category = Command::Category::interrogator;
|
_category = Command::Category::metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -51,7 +51,7 @@ CmdIDs::CmdIDs ()
|
||||||
_accepts_filter = true;
|
_accepts_filter = true;
|
||||||
_accepts_modifications = false;
|
_accepts_modifications = false;
|
||||||
_accepts_miscellaneous = false;
|
_accepts_miscellaneous = false;
|
||||||
_category = Command::Category::interrogator;
|
_category = Command::Category::metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -223,7 +223,7 @@ CmdUUIDs::CmdUUIDs ()
|
||||||
_accepts_filter = true;
|
_accepts_filter = true;
|
||||||
_accepts_modifications = false;
|
_accepts_modifications = false;
|
||||||
_accepts_miscellaneous = false;
|
_accepts_miscellaneous = false;
|
||||||
_category = Command::Category::interrogator;
|
_category = Command::Category::metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -58,7 +58,7 @@ CmdInfo::CmdInfo ()
|
||||||
_accepts_filter = true;
|
_accepts_filter = true;
|
||||||
_accepts_modifications = false;
|
_accepts_modifications = false;
|
||||||
_accepts_miscellaneous = false;
|
_accepts_miscellaneous = false;
|
||||||
_category = Command::Category::interrogator;
|
_category = Command::Category::metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -51,7 +51,7 @@ CmdProjects::CmdProjects ()
|
||||||
_accepts_filter = true;
|
_accepts_filter = true;
|
||||||
_accepts_modifications = false;
|
_accepts_modifications = false;
|
||||||
_accepts_miscellaneous = false;
|
_accepts_miscellaneous = false;
|
||||||
_category = Command::Category::interrogator;
|
_category = Command::Category::metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -53,7 +53,7 @@ CmdStats::CmdStats ()
|
||||||
_accepts_filter = true;
|
_accepts_filter = true;
|
||||||
_accepts_modifications = false;
|
_accepts_modifications = false;
|
||||||
_accepts_miscellaneous = false;
|
_accepts_miscellaneous = false;
|
||||||
_category = Command::Category::interrogator;
|
_category = Command::Category::metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -50,7 +50,7 @@ CmdTags::CmdTags ()
|
||||||
_accepts_filter = true;
|
_accepts_filter = true;
|
||||||
_accepts_modifications = false;
|
_accepts_modifications = false;
|
||||||
_accepts_miscellaneous = false;
|
_accepts_miscellaneous = false;
|
||||||
_category = Command::Category::interrogator;
|
_category = Command::Category::metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -199,7 +199,7 @@ const std::map <Command::Category, std::string> Command::categoryNames =
|
||||||
{
|
{
|
||||||
// These strings are intentionally not l10n'd: they are used as identifiers.
|
// These strings are intentionally not l10n'd: they are used as identifiers.
|
||||||
{Command::Category::unassigned, "unassigned"} // should never happen
|
{Command::Category::unassigned, "unassigned"} // should never happen
|
||||||
,{Command::Category::interrogator, "interrogator"}
|
,{Command::Category::metadata, "metadata"}
|
||||||
,{Command::Category::report, "report"}
|
,{Command::Category::report, "report"}
|
||||||
,{Command::Category::operation, "operation"}
|
,{Command::Category::operation, "operation"}
|
||||||
,{Command::Category::context, "context"}
|
,{Command::Category::context, "context"}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
{
|
{
|
||||||
unassigned,
|
unassigned,
|
||||||
// In presentation ("usefulness") order: frequently-used categories first.
|
// In presentation ("usefulness") order: frequently-used categories first.
|
||||||
interrogator,
|
metadata,
|
||||||
report,
|
report,
|
||||||
operation,
|
operation,
|
||||||
context,
|
context,
|
||||||
|
|
|
@ -232,12 +232,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "Haus @Hausarbeit next"
|
#define STRING_COLUMN_EXAMPLES_TAGS "Haus @Hausarbeit next"
|
||||||
|
|
|
@ -232,12 +232,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore next"
|
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore next"
|
||||||
|
|
|
@ -232,12 +232,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "domo @aĉo next"
|
#define STRING_COLUMN_EXAMPLES_TAGS "domo @aĉo next"
|
||||||
|
|
|
@ -233,12 +233,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "casa @tarea"
|
#define STRING_COLUMN_EXAMPLES_TAGS "casa @tarea"
|
||||||
|
|
|
@ -232,12 +232,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "maison @routine next"
|
#define STRING_COLUMN_EXAMPLES_TAGS "maison @routine next"
|
||||||
|
|
|
@ -232,12 +232,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "casa @faccende next"
|
#define STRING_COLUMN_EXAMPLES_TAGS "casa @faccende next"
|
||||||
|
|
|
@ -232,12 +232,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore next"
|
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore next"
|
||||||
|
|
|
@ -232,12 +232,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore next"
|
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore next"
|
||||||
|
|
|
@ -233,12 +233,12 @@
|
||||||
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
#define STRING_COLUMN_LABEL_COMMAND "Command"
|
||||||
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
#define STRING_COLUMN_LABEL_CATEGORY "Category"
|
||||||
#define STRING_COLUMN_LABEL_RO "R/W"
|
#define STRING_COLUMN_LABEL_RO "R/W"
|
||||||
#define STRING_COLUMN_LABEL_SHOWS_ID "ID?"
|
#define STRING_COLUMN_LABEL_SHOWS_ID "ID"
|
||||||
#define STRING_COLUMN_LABEL_GC "GC?"
|
#define STRING_COLUMN_LABEL_GC "GC"
|
||||||
#define STRING_COLUMN_LABEL_CONTEXT "Context?"
|
#define STRING_COLUMN_LABEL_CONTEXT "Context"
|
||||||
#define STRING_COLUMN_LABEL_FILTER "Filter?"
|
#define STRING_COLUMN_LABEL_FILTER "Filter"
|
||||||
#define STRING_COLUMN_LABEL_MODS "Mods?"
|
#define STRING_COLUMN_LABEL_MODS "Mods"
|
||||||
#define STRING_COLUMN_LABEL_MISC "Other?"
|
#define STRING_COLUMN_LABEL_MISC "Misc"
|
||||||
|
|
||||||
// Column Examples
|
// Column Examples
|
||||||
#define STRING_COLUMN_EXAMPLES_TAGS "casa @contas próxima"
|
#define STRING_COLUMN_EXAMPLES_TAGS "casa @contas próxima"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue