nodejs/node

NODE_COLORS env

Closed this issue · 3 comments

Right now the CLI supports NODE_DISABLE_COLORS to deactivate colors in the repl.

Instead, I think it would be nicer to deprecate that one and add a NODE_COLORS env. That way it would also be possible to enforce colors in e.g. the console all the time.

Do others agree?

I think something like NODE_REPL_COLORS, which defaults to true would have made more sense originally. I'm not sure if going through the process of removing the existing environment variable to replace it is worth it though.

I personally would just like to have something more powerful in general. There a couple of places where adding colors makes sense. Detecting the colors is not that easy though. So we definitely want to have a way to either enforce or to deactivate colors again.

Trott commented

Given inactivity since January, I'm going to close this. Feel free to re-open if there's more to discuss at this time.