chelnak / gh-changelog

A gh cli extension that will make your changelogs ✨
MIT License
110 stars 4 forks source link

Colorize config output #77

Closed chelnak closed 2 years ago

chelnak commented 2 years ago

This PR adds optional colorization of the config output. In certain situations this can make reading configuration easier and it also looks pretty neat.

There is also an optional --no-color flag that can be passed. This will disable set the chroma formatter to noop rather than terminal16m. Currently, the data is still tokenized by chroma but not formatted so it does not print with any ascii codes.

In this implementation it doesn't matter too much because the size of the configuration will always been small so there are no major tradeoffs.. an improved solution could be to skip passing through chroma if the --no-color flag is passed!