We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As described in https://github.com/fatih/color#disableenable-color and can be seen in https://github.com/fatih/color/blob/main/color.go#L23, when piping the output no colors will be applied. There are some usecases when the user might want the colors to persist even when piping (e.g. piping a command output to less -R). Is it possible to add an option to force colors unconditionally?
less -R
The text was updated successfully, but these errors were encountered:
If you explicitly set NoColor to false, it will forcefully log with escape characters, so (it's false instead of true):
NoColor
false
true
if *flagForceColor { color.NoColor = false // force colorized output }
Does this solve your issue?
Sorry, something went wrong.
Confirmed as working, thanks.
No branches or pull requests
As described in https://github.com/fatih/color#disableenable-color and can be seen in https://github.com/fatih/color/blob/main/color.go#L23, when piping the output no colors will be applied.
There are some usecases when the user might want the colors to persist even when piping (e.g. piping a command output to
less -R
).Is it possible to add an option to force colors unconditionally?
The text was updated successfully, but these errors were encountered: