Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Respect TERM=dumb and emit no colour escape codes #847
Certain shells are not particularly happy with colour escape codes. To make them happy, clap should respect
rustc 1.15.0 (10893a9a3 2017-01-19)
Affected Version of clap
Expected Behavior Summary
For a program using clap to respect
Actual Behavior Summary
Program using clap emits colour escape codes as shown in BurntSushi/ripgrep#353.
Steps to Reproduce the issue
Compile any program using clap as a dependency and use an unrecognised flag:
My expectation of moving forward is by calling "curses interfaces to terminfo database" (
When I discover anything more, I'll report back.
@nateozem Consulting terminfo is certainly one path. It's a complex one, but it's valid. On the other hand, just respecting
An example of a popular piece of software that generally gets colors correct is GNU grep, but they don't consult terminfo at all. This sacrifices compatibility on some very obscure terminal environments, but standard ANSI escapes pretty much work everywhere. (And GNU grep supports
We could do almost the same thing as they have done
It's very simple. Think this would work for us?