mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI2: ::findCommand now return a bool indicating what happened.
This commit is contained in:
parent
9af18183c9
commit
68ac07080c
2 changed files with 7 additions and 4 deletions
|
@ -944,7 +944,7 @@ void CLI2::findOverrides ()
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void CLI2::findCommand ()
|
||||
bool CLI2::findCommand ()
|
||||
{
|
||||
for (auto& a : _args)
|
||||
{
|
||||
|
@ -960,10 +960,13 @@ void CLI2::findCommand ()
|
|||
if (context.config.getInteger ("debug.parser") >= 3)
|
||||
context.debug (dump ("CLI2::analyze findCommand"));
|
||||
|
||||
// Stop at first command.
|
||||
break;
|
||||
// Stop and indicate command found.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Indicate command not found.
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue