mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +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
|
@ -4,7 +4,7 @@
|
|||
2.0.1 ()
|
||||
|
||||
Features
|
||||
+ Feature #325, #339, #435, User Defined Attributes.
|
||||
+ Feature #164, #325, #339, #435, #553, #554, #975, User Defined Attributes.
|
||||
+ Feature #457, #922, tasks may now be given an 'until' date, after which they
|
||||
expire and are deleted.
|
||||
+ Feature #516, which allows the duplication of completed tasks (thanks to
|
||||
|
|
2
NEWS
2
NEWS
|
@ -14,7 +14,7 @@ New Features in taskwarrior 2.0.1
|
|||
New commands in taskwarrior 2.0.1
|
||||
|
||||
- New 'ready' report that lists tasks ready for work, sorted by urgency.
|
||||
- New 'udas' command shows UDA details.
|
||||
- New 'udas' command shows UDA details and warnings.
|
||||
- New '_udas' helper command lists UDA names for completion purposes.
|
||||
|
||||
New configuration options in taskwarrior 2.0.1
|
||||
|
|
|
@ -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