Bug Fix - parsing

- Now properly enumerates ambiguous commands.
- Now properly enumerates ambiguous colors.
- Now displays suitable error when a command like "task x" is entered.
This commit is contained in:
Paul Beckingham 2009-06-25 22:21:43 -04:00
parent d6168ff6a6
commit 53155fcc34
5 changed files with 11 additions and 4 deletions

View file

@ -550,7 +550,14 @@ void Context::parse (
parseTask.set ("description", descCandidate);
}
// TODO task.validate () ?
// At this point, either a sequence or a command should have been found.
if (parseSequence.size () == 0 && parseCmd.command == "")
{
parseCmd.parse (descCandidate);
throw stringtable.get (
CMD_MISSING,
"You must specify a command, or a task ID to modify");
}
// Read-only command (reports, status, info ...) use filters. Write commands
// (add, done ...) do not.