CmdNews: Add short outro on interrupt

This commit is contained in:
Tomas Babej 2021-10-02 16:06:28 -04:00
parent 7e3ea4f47e
commit cb4444098e
No known key found for this signature in database
GPG key ID: B0747C6578F7D2F5

View file

@ -59,7 +59,18 @@ static void signal_handler (int s)
{
if (s == SIGINT)
{
Color footnote;
if (Context::getContext ().color ()) {
if (Context::getContext ().config.has ("color.footnote"))
footnote = Color (Context::getContext ().config.get ("color.footnote"));
}
std::cout << "\n\nCome back and read about new features later!\n";
std::cout << footnote.colorize (
"\nIf you enjoy Taskwarrior, please consider supporting the project at:\n"
" https://github.com/sponsors/GothenburgBitFactory/\n"
);
exit (1);
}
}