From 7e62ddb8554d1644d07bf31ff88a84ba027a6701 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Sat, 27 Jan 2024 07:27:36 +0800 Subject: [PATCH] Fix `Colorize.enabled?`'s documentation --- src/colorize.cr | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/colorize.cr b/src/colorize.cr index 48975c8a451f..83fd82c3935e 100644 --- a/src/colorize.cr +++ b/src/colorize.cr @@ -129,8 +129,7 @@ module Colorize # "hello".colorize.red.to_s # => "hello" # ``` # - # NOTE: This is by default disabled on non-TTY devices because they likely don't support ANSI escape codes. - # This will also be disabled if the environment variable `TERM` is "dumb" or `NO_COLOR` contains any value. + # NOTE: This is by default disabled if the environment variable `NO_COLOR` contains any value. class_property? enabled : Bool { !ENV.has_key?("NO_COLOR") } # Makes `Colorize.enabled` `true` if and only if both of `STDOUT.tty?`