mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 15:47:19 +02:00
Enhancement - Hooks
- Added Lua copyright notice to the version command. - Added Lua copyright details to API.cpp, which is the only file that interacts with Lua. - Added hook-type detection. - Added a hook-type calling mechanism in Hooks. - Implemented the post-start and pre-exit event triggers. - Context::initialize now calls Hooks::initialize, which in turn calls API::initialize. We have liftoff!
This commit is contained in:
parent
c66d6b0500
commit
57e94585e8
5 changed files with 141 additions and 6 deletions
|
@ -83,6 +83,11 @@ void Context::initialize (int argc, char** argv)
|
|||
}
|
||||
|
||||
initialize ();
|
||||
|
||||
// Hook system init, plus post-start event occurring at the first possible
|
||||
// moment after hook initialization.
|
||||
hooks.initialize ();
|
||||
hooks.trigger ("post-start");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -180,6 +185,7 @@ int Context::run ()
|
|||
else
|
||||
std::cout << *f << std::endl;
|
||||
|
||||
hooks.trigger ("pre-exit");
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue