Enhancement - Hooks

- Added many more format hooks.
- Added unit tests for all added hooks.
- Added unit tests for format-countdown and format-countdown_compact.
This commit is contained in:
Paul Beckingham
2010-03-01 18:14:06 -05:00
parent 95e420bb15
commit f6ff18e31d
16 changed files with 1035 additions and 22 deletions

View File

@@ -1646,7 +1646,13 @@ void handleShell ()
do
{
std::cout << context.config.get ("shell.prompt") << " ";
std::string prompt = context.config.get ("shell.prompt");
if (context.hooks.trigger ("pre-shell-prompt"))
{
context.hooks.trigger ("format-prompt", "prompt", prompt);
std::cout << prompt << " ";
}
context.hooks.trigger ("post-shell-prompt");
command = "";
std::getline (std::cin, command);