mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Feature
- Allow ID ranges when editing dependencies.
This commit is contained in:
parent
4ee64a52de
commit
38078e9228
2 changed files with 11 additions and 9 deletions
|
@ -575,18 +575,20 @@ void CmdEdit::parseTask (Task& task, const std::string& after)
|
|||
std::vector <std::string>::iterator dep;
|
||||
for (dep = dependencies.begin (); dep != dependencies.end (); ++dep)
|
||||
{
|
||||
int id = 0;
|
||||
std::vector <int> ids;
|
||||
|
||||
// Crude UUID check.
|
||||
// Crude UUID check
|
||||
if (dep->length () == 36)
|
||||
id = context.tdb2.pending.id (*dep);
|
||||
{
|
||||
int id = context.tdb2.pending.id (*dep);
|
||||
ids.push_back (id);
|
||||
}
|
||||
else
|
||||
id = atoi (dep->c_str ());
|
||||
A3::extract_id (*dep, ids);
|
||||
|
||||
if (id)
|
||||
task.addDependency (id);
|
||||
else
|
||||
task.addDependency (*dep);
|
||||
std::vector <int>::iterator id;
|
||||
for (id = ids.begin (); id != ids.end(); id++)
|
||||
task.addDependency (*id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -599,7 +599,7 @@
|
|||
#define STRING_EDIT_UNPARSEABLE "Taskwarrior couldn't handle your edits. Would you like to try again?"
|
||||
#define STRING_EDIT_UNWRITABLE "Your data.location directory is not writable."
|
||||
#define STRING_EDIT_TAG_SEP "Separate the tags with spaces, like this: tag1 tag2"
|
||||
#define STRING_EDIT_DEP_SEP "Dependencies should be a comma-separated list of task IDs/UUIDs, with no spaces."
|
||||
#define STRING_EDIT_DEP_SEP "Dependencies should be a comma-separated list of task IDs/UUIDs or ID ranges, with no spaces."
|
||||
#define STRING_EDIT_END "End"
|
||||
|
||||
#define STRING_EDIT_PROJECT_MOD "Project modified."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue