From acb70520f8f1982e60abdd171a43d195b555b280 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 10 Feb 2023 17:06:02 -0500 Subject: [PATCH] Add colored environment variables to README (#2746) --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 3752f68945..7ed31aa9a4 100644 --- a/README.md +++ b/README.md @@ -1985,6 +1985,15 @@ unfixable = ["B", "SIM", "TRY", "RUF"] If you find a case where Ruff's autofix breaks your code, please file an Issue! +### How can I disable Ruff's color output? + +Ruff's color output is powered by the [`colored`](https://crates.io/crates/colored) crate, which +attempts to automatically detect whether the output stream supports color. However, you can force +colors off by setting the `NO_COLOR` environment variable to any value (e.g., `NO_COLOR=1`). + +[`colored`](https://crates.io/crates/colored) also supports the the `CLICOLOR` and `CLICOLOR_FORCE` +environment variables (see the [spec](https://bixense.com/clicolors/)). + ## Contributing