mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Hooks
- Added Hooks::list method to provide a list of known hooks.
This commit is contained in:
parent
e660f61cd2
commit
0ffc95e312
2 changed files with 8 additions and 0 deletions
|
@ -271,6 +271,12 @@ void Hooks::onModify (const Task& before, Task& after)
|
|||
context.timer_hooks.stop ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::vector <std::string> Hooks::list ()
|
||||
{
|
||||
return _scripts;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::vector <std::string> Hooks::scripts (const std::string& event)
|
||||
{
|
||||
|
|
|
@ -45,6 +45,8 @@ public:
|
|||
void onAdd (Task&);
|
||||
void onModify (const Task&, Task&);
|
||||
|
||||
std::vector <std::string> list ();
|
||||
|
||||
private:
|
||||
std::vector <std::string> scripts (const std::string&);
|
||||
int execute (const std::string&, const std::string&, std::string&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue