mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Enhancement
- The 'udas' command now reports allowable values for UDAs.
This commit is contained in:
parent
66eb09ab25
commit
2be691c2c5
4 changed files with 8 additions and 4 deletions
|
@ -81,13 +81,15 @@ int CmdUDAs::execute (std::string& output)
|
|||
view.add (Column::factory ("string", STRING_COLUMN_LABEL_UDA));
|
||||
view.add (Column::factory ("string", STRING_COLUMN_LABEL_TYPE));
|
||||
view.add (Column::factory ("string", STRING_COLUMN_LABEL_LABEL));
|
||||
view.add (Column::factory ("string", STRING_COLUMN_LABEL_VALUES));
|
||||
|
||||
|
||||
std::vector <std::string>::iterator uda;
|
||||
for (uda = udas.begin (); uda != udas.end (); ++uda)
|
||||
{
|
||||
std::string type = context.config.get ("uda." + *uda + ".type");
|
||||
std::string label = context.config.get ("uda." + *uda + ".label");
|
||||
std::string type = context.config.get ("uda." + *uda + ".type");
|
||||
std::string label = context.config.get ("uda." + *uda + ".label");
|
||||
std::string values = context.config.get ("uda." + *uda + ".values");
|
||||
if (label == "")
|
||||
label = *uda;
|
||||
|
||||
|
@ -95,6 +97,7 @@ int CmdUDAs::execute (std::string& output)
|
|||
view.set (row, 0, *uda);
|
||||
view.set (row, 1, type);
|
||||
view.set (row, 2, label);
|
||||
view.set (row, 3, values);
|
||||
}
|
||||
|
||||
out << optionalBlankLine ()
|
||||
|
|
|
@ -186,6 +186,7 @@
|
|||
#define STRING_COLUMN_LABEL_UDA "Name"
|
||||
#define STRING_COLUMN_LABEL_TYPE "Type"
|
||||
#define STRING_COLUMN_LABEL_LABEL "Label"
|
||||
#define STRING_COLUMN_LABEL_VALUES "Allowed Values"
|
||||
|
||||
// Column Examples
|
||||
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue