Retain color codes when piped?
edobry opened this issue · 1 comments
Hello, great tool, thank you!
Is it possible to retain the output color codes when piped into a command which supports reading then, such as
dyf ... | bat --color=always
A few other commands have options to force this setting, would be very helpful. For context, I'm using dyff
from https://github.com/databus23/helm-diff.
I see that there's an undocumented CLI flag to enable this, would be great if it could be added to the README.
Additionally, if dyff
could perhaps expose a method in pkg
to allow programmatic users to force color mode like in this test case, that could provide a path to a solution?
Hello, great tool, thank you!
Is it possible to retain the output color codes when piped into a command which supports reading then, such as
dyf ... | bat --color=always
A few other commands have options to force this setting, would be very helpful. For context, I'm using
dyff
from https://github.com/databus23/helm-diff.I see that there's an undocumented CLI flag to enable this, would be great if it could be added to the README.
Additionally, if
dyff
could perhaps expose a method inpkg
to allow programmatic users to force color mode like in this test case, that could provide a path to a solution?
Hey! I sorry for the belayed response. There is a way to force keeping the colors even though a pipe was detected: --color=on
. Other values are off
, and auto
(default).
Hope this helps.