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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user