mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Extension Mechanism Cleanup
- Cleaned up existing extension debris, in anticipation of the new mechanisms to be included in future releases. This includes install/uninstall and a full set of triggers.
This commit is contained in:
parent
a736568e68
commit
19cdf25a8f
26 changed files with 10 additions and 913 deletions
|
@ -350,46 +350,6 @@ int CmdShow::execute (std::string& output)
|
|||
// TODO Check for referenced but missing string files.
|
||||
// TODO Check for referenced but missing tips files.
|
||||
|
||||
// Check for referenced but missing hook scripts.
|
||||
#ifdef HAVE_LIBLUA
|
||||
std::vector <std::string> missing_scripts;
|
||||
for (i = all.begin (); i != all.end (); ++i)
|
||||
{
|
||||
if (i->substr (0, 5) == "hook.")
|
||||
{
|
||||
std::string value = context.config.get (*i);
|
||||
Nibbler n (value);
|
||||
|
||||
// <path>:<function> [, ...]
|
||||
while (!n.depleted ())
|
||||
{
|
||||
std::string file;
|
||||
std::string function;
|
||||
if (n.getUntil (':', file) &&
|
||||
n.skip (':') &&
|
||||
n.getUntil (',', function))
|
||||
{
|
||||
Path script (file);
|
||||
if (!script.exists () || !script.readable ())
|
||||
missing_scripts.push_back (file);
|
||||
|
||||
(void) n.skip (',');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (missing_scripts.size ())
|
||||
{
|
||||
out << STRING_CMD_SHOW_HOOKS << "\n";
|
||||
|
||||
for (i = missing_scripts.begin (); i != missing_scripts.end (); ++i)
|
||||
out << " " << *i << "\n";
|
||||
|
||||
out << "\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check for bad values in rc.calendar.details.
|
||||
std::string calendardetails = context.config.get ("calendar.details");
|
||||
if (calendardetails != "full" &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue