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;
|
std::vector <std::string>::iterator dep;
|
||||||
for (dep = dependencies.begin (); dep != dependencies.end (); ++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)
|
if (dep->length () == 36)
|
||||||
id = context.tdb2.pending.id (*dep);
|
{
|
||||||
|
int id = context.tdb2.pending.id (*dep);
|
||||||
|
ids.push_back (id);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
id = atoi (dep->c_str ());
|
A3::extract_id (*dep, ids);
|
||||||
|
|
||||||
if (id)
|
std::vector <int>::iterator id;
|
||||||
task.addDependency (id);
|
for (id = ids.begin (); id != ids.end(); id++)
|
||||||
else
|
task.addDependency (*id);
|
||||||
task.addDependency (*dep);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -599,7 +599,7 @@
|
||||||
#define STRING_EDIT_UNPARSEABLE "Taskwarrior couldn't handle your edits. Would you like to try again?"
|
#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_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_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_END "End"
|
||||||
|
|
||||||
#define STRING_EDIT_PROJECT_MOD "Project modified."
|
#define STRING_EDIT_PROJECT_MOD "Project modified."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue