Skip to content

Coloured output despite setting $TERM to "xterm-mono" #7646

Closed

Description

Problem
When I set TERM to xterm-mono, I expect programmes to honor that. Cargo shows colours despite me telling it that my terminal is monochrome. Yes, I know about --color=never, that's not the point. The point is that when a terminal doesn't support colours, programmes shouldn't attempt to print them.

Steps

$ export TERM="xterm-mono"
$ cargo $ANY_COMMAND

Possible Solution(s)
Default to --color=never on non-coloured terminals.

Notes

Output of cargo version:

$ cargo --version
cargo 1.39.0 (1c6ec66d5 2019-09-30)
$ uname -a
Linux ainar-IdeaPad-U330p 4.15.0-71-generic #80-Ubuntu SMP Thu Nov 14 02:19:47 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-console-outputArea: Terminal output, colors, progress bar, etc.C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions