Override formatter colors from envvars#1095
Conversation
This allows a user to set environment variables `GINKGO_CLI_COLOR_<color>` with asci code overrides. This helps a lot when the colorscheme that you are using doesn't play well with the colors from the 256 color scheme which currently is hard coded. Example `GINKGO_CLI_COLOR_RED=$'\x1b[31m' ginkgo` will use the red from the 8bit colors configured in the terminal.
|
I dont nessesarily expect this to get merged as-is, but I would love an option to be able to change the colors of the terminal output. I am open to any input with regards to how this could be done differently.
|
|
hey there - longer term my plan is to add support for some sort of .ginkgoconfig file or something that would be a natural place for something like this. For now environment variables seem fine but I'd like to reserve the right to deprecate them at some point and transition to a config file based approached. Happy to pull this in once CI goes green, with those caveats. |
|
@onsi Yea this could also be better implemented. The following values would be nice to map in order to make configuration way easier. For the standard 16 colors For extended 256 colors |
|
hey, i think that's fine - but perhaps i'm not following? are you planning on another PR to support those aliases? |
|
@onsi yea will do it today. |
This allows a user to set environment variables
GINKGO_CLI_COLOR_<color>with asci code overrides. This helps a lot when the colorscheme that you are using doesn't play well with the colors from the 256 color scheme which currently is hard coded.Example
GINKGO_CLI_COLOR_RED=$'\x1b[31m' ginkgowill use the red from the 8bit colors configured in the terminal.