Enhancement - Hooks

- Multiple hooks for the same event are now triggered, in the sequence
  they are found in .taskrc
- Program hooks can now cause task to exit.
This commit is contained in:
Paul Beckingham 2010-01-18 20:19:51 -05:00
parent 69cae7731f
commit 78063c4df7
3 changed files with 13 additions and 10 deletions

View file

@ -194,8 +194,7 @@ int Context::dispatch (std::string &out)
Timer t ("Context::dispatch");
if (! hooks.trigger ("pre-dispatch"))
return rc;
hooks.trigger ("pre-dispatch");
// TODO Just look at this thing. It cries out for a dispatch table.
if (cmd.command == "projects") { rc = handleProjects (out); }