box-project / box

📦🚀 Fast, zero config application bundler with PHARs.
https://box-project.github.io/box
MIT License
1.12k stars 101 forks source link

[Cosmetic] Full support to `--no-ansi` option especially for icons #1400

Open llaville opened 1 month ago

llaville commented 1 month ago

The Symfony Console Application has, by defaut a --no-ansi option that will allows to turn off colors on CLI output.

BTW, BOX as icons in front of command description, and should be dropped when --no-ansi option is in effect.

See current results

box-no-ansi

theofidry commented 1 month ago

Technically emojis are not ANSI so they can be part of plain text, but maybe it was wrong of me to assume they would be fine in a plain text output.

I would need to check, but implementation this looks difficult: the description is provided before any runtime information is given so you do not know if it's ANSI or not at that time (and usually you do not care as ANSI tags are removed by the formatter if not ansi. Maybe there could be a way by adding a specific tag which would be stripped down the same way

llaville commented 1 month ago

Don't waste your time on this issue, it's very few important after all !