4 ms·
This is generally the behavior I've seen on my everyday apps that support color in their output. Often they have a `--color auto|never|always` command line opt
by eminence32 5y ago
This is generally the behavior I've seen on my everyday apps that support color in their output. Often they have a `--color auto|never|always` command line option, with "auto" being the default, which detects if the output is a TTY or some other interactive terminal
- brundolf 5y agoAuto-detecting is good, but I was suggesting a third-party program that just takes arbitrary input, strips the control characters, and produces the resulting output, in case the original app can't do what you need as a user
- eminence32 5y agoAh, yes. Sorry, I misread your comment. Yes, that is a good idea :)
- MereInterest 5y agoThis stack overflow post has a sed command that will strip them for you, so no need for a dedicated program. https://stackoverflow.com/a/18000433 https://stackoverflow.com/a/18000433