mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Enhancement - custom report name collisions
- Task now emits an error if a custom report name collides with that of a built-in command.
This commit is contained in:
parent
aeaf443f67
commit
315c70c503
2 changed files with 69 additions and 64 deletions
|
@ -147,9 +147,14 @@ void Cmd::load ()
|
|||
{
|
||||
report = report.substr (0, columns);
|
||||
|
||||
|
||||
// Make sure a custom report does not clash with a built-in
|
||||
// command.
|
||||
if (std::find (commands.begin (), commands.end (), report) != commands.end ())
|
||||
throw std::string ("Custom report '") + report +
|
||||
"' conflicts with built-in task command.";
|
||||
|
||||
// A custom report is also a command.
|
||||
// TODO Make sure a custom report does not clash with a built-in
|
||||
// command.
|
||||
customReports.push_back (report);
|
||||
commands.push_back (report);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue