mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
Hooks
- Scans <rc.data.location>/hooks for files on initialize.
This commit is contained in:
parent
cc112aeec7
commit
12a2012f20
2 changed files with 8 additions and 1 deletions
|
@ -43,7 +43,10 @@ Hooks::~Hooks ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Hooks::initialize ()
|
void Hooks::initialize ()
|
||||||
{
|
{
|
||||||
// TODO Scan <rc.data.location>/hooks
|
// Scan <rc.data.location>/hooks
|
||||||
|
Directory d (context.config.get ("data.location"));
|
||||||
|
if (d.cd ("hooks"))
|
||||||
|
_scripts = d.list ();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
#ifndef INCLUDED_HOOKS
|
#ifndef INCLUDED_HOOKS
|
||||||
#define INCLUDED_HOOKS
|
#define INCLUDED_HOOKS
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
class Hooks
|
class Hooks
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -41,6 +44,7 @@ public:
|
||||||
void onExit ();
|
void onExit ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::vector <std::string> _scripts;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue