mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Hooks
- Added a master control, rc.hooks, which defaults to 'on', but can be used to disable hook processing in general.
This commit is contained in:
parent
150f72eed4
commit
78650ac8c3
6 changed files with 21 additions and 7 deletions
|
@ -55,14 +55,17 @@ Hooks::~Hooks ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Hooks::initialize ()
|
||||
{
|
||||
// Scan <rc.data.location>/hooks
|
||||
Directory d (context.config.get ("data.location"));
|
||||
d += "hooks";
|
||||
if (d.is_directory () &&
|
||||
d.readable ())
|
||||
if (context.config.getBoolean ("hooks"))
|
||||
{
|
||||
_scripts = d.list ();
|
||||
std::sort (_scripts.begin (), _scripts.end ());
|
||||
// Scan <rc.data.location>/hooks
|
||||
Directory d (context.config.get ("data.location"));
|
||||
d += "hooks";
|
||||
if (d.is_directory () &&
|
||||
d.readable ())
|
||||
{
|
||||
_scripts = d.list ();
|
||||
std::sort (_scripts.begin (), _scripts.end ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue