mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
example colour output
This commit is contained in:
parent
de61c0c28a
commit
5596b2e716
3 changed files with 24 additions and 1 deletions
|
@ -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;
|
||||
} /* }}} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue