example colour output

This commit is contained in:
krakjoe 2013-11-24 20:16:46 +00:00
parent de61c0c28a
commit 5596b2e716
3 changed files with 24 additions and 1 deletions

View file

@ -450,6 +450,23 @@ PHPDBG_HELP(set) /* {{{ */
++set_command;
}
}
phpdbg_notice("Colors");
{
const phpdbg_color_t *color = phpdbg_get_colors(TSRMLS_C);
if (PHPDBG_G(flags) & PHPDBG_IS_COLOURED) {
phpdbg_writeln("\t%-15s\t\tExample", "Name");
} else phpdbg_writeln("\tName");
while (color && color->name) {
if (PHPDBG_G(flags) & PHPDBG_IS_COLOURED) {
phpdbg_writeln(
"\t%-15s\t\t\033[%smphpdbg rocks :)\033[0m", color->name, color->code);
} else phpdbg_writeln("\t%s", color->name);
++color;
}
}
phpdbg_help_footer();
return SUCCESS;
} /* }}} */