ansi-php
ansi-php copied to clipboard
ANSI Control Functions and ANSI Control Sequences (Colors, Erasing, etc.) for PHP CLI Apps
the color method is typed with a `array` parameter for `color`. https://github.com/bramus/ansi-php/blob/f581b2fd322177e5fabd67af240811838c1c8fbc/src/Traits/EscapeSequences/SGR.php#L47-L55 a lot of examples in the readme indicate that its finde to pass a single color. static analysis...
it seems there is a difference between these 2 calls: `$ansi->color(SGR::COLOR_FG_RED)->text($text)->reset()->lf();` `$ansi->color(SGR::COLOR_FG_RED)->text($text)->lf()->reset();` phpstorm and phpstan tell me that the 2nd example is an error. from a user point of view,...
Hi, thanks for the great library. PhpStorm couldn't resolve the return type for methods in `Bramus\Ansi\Traits\ControlFunctions` so I made a small fix. Example code that shows the error: ``` public...
I needed this for a thing so I thought I'd share it upstream as well. This implements the DEC/VT100 standard for saving and restoring a cursor position (and attributes, like...
# Shortcode parser Just a simple QOL update that allows you to put small shortcodes in a string and parse it into ANSI. It turns something like this: ```php $writer->eraseDisplay()->cursorPosition(12,22)->underline()->text("Hello")->reset()->cursorDown(2)->color(SGR::COLOR_FG_GREEN)->text("wo")->bold()->text("rl")->normal()->text("d!")->reset()->lf()->lf()->lf();...