Skip to content

Support NO_COLOR to disable colored output #7464

Closed
@nicoddemus

Description

@nicoddemus

NO_COLOR is a community standard environement variable.

The general behavior is:

  • A command line application emits colour when attached to a TTY, but no colour otherwise e.g. when attached to a pipe.
  • NO_COLOR stops the application from emitting colour even when attached to a TTY
  • My extension to the standard is to add FORCE_COLOR which forces the application to emit colour escape sequences even when not outputting to a TTY e.g. if we want to pipe into a log file with colour.

Originally posted by @jhol in #7443 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributortopic: reportingrelated to terminal output and user-facing messages and errorstype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions