programmatically force color in non-tty env? #546
Replies: 2 comments 1 reply
-
|
I agree. I'm tired to install |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Enable FORCE_COLOR=1 by default? It can break a lot of scripts. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With --color / FORCE_COLOR I can manually force colors etc even for non-tty circumstances. Examples of how I can do it:
Is it possible to make this decision within the script? As in:
Use case: I want to develop scripts that have conversations with the user on tty's ... while still allowing them to capture stdout. I can do this from within the code with some tty detection + stream proxying. Seems to work ok(ish) ...but then I also want to have colors and font formatting etc; that in turn requires forcing color support (somehow, either via args, env vars ... or possibly "programmatically" which is what this question/discussion is really about).
Beta Was this translation helpful? Give feedback.
All reactions