An open API service indexing awesome lists of open source software.

https://github.com/gobwas/shellstyle

ShellStyle is a simple php class that allows you to get wrapped Unix/Linux colored output with ANSI escape codes
https://github.com/gobwas/shellstyle

Last synced: about 1 month ago
JSON representation

ShellStyle is a simple php class that allows you to get wrapped Unix/Linux colored output with ANSI escape codes

Awesome Lists containing this project

README

        

README
======

ShellStyle
-----------------

ShellStyle is a simple php class that allows you to get wrapped Unix/Linux colored output with ANSI escape codes:

Usage
-----------------
Usage of ShellStyle is quite simple:

use Gobwas\ShellStyle\ShellStyle;

// First way to define style
$green = new ShellStyle();
$green
->addStyle(ShellStyle::FOREGROUND_GREEN)
->addStyle(ShellStyle::STYLE_BOLD);

// Another way to define style
$yellow = new ShellStyle(array(ShellStyle::FOREGROUND_YELLOW));

echo $green->parse("Hello");
echo $yellow->parse("World!");