wp-cli / php-cli-tools

A collection of tools to help with PHP command line utilities
MIT License
672 stars 118 forks source link

Colors::colorize removes sprintf flags on windows #90

Closed Korri closed 8 years ago

Korri commented 8 years ago

I'm using the script on windows, and shouldColorize returns false, so the following lines strips all sprintf flags:

$return = preg_replace('/%((%)|.)/', '$2', $string);

Causes cli\menu() to show a list of dots instead of the choices.

danielbachhuber commented 8 years ago

I'm using the script on windows, and shouldColorize returns false

Hm. Do you have a suggested fix?

Korri commented 8 years ago

I'll comment on #86 as the discution seem to be going on there.

danielbachhuber commented 8 years ago

@Korri Can you verify the fix in #91 ?

Korri commented 8 years ago

Works like a charm !

danielbachhuber commented 8 years ago

:+1: