For visually impaired people, having color enabled on output poses daily challenges. Many programs provide means to disable color -- however those flags are particular to the application (increasing burden on the user), or have environment variables that vary by application.
The site no-color.org suggests a simple NO_COLOR environment variable as a hint to applications (see https://no-color.org) as a simple way for "color impaired" people to disable color output.
This code leverages the NO_COLOR environment variable to set the same flag as the "-n" flag.
For visually impaired people, having color enabled on output poses daily challenges. Many programs provide means to disable color -- however those flags are particular to the application (increasing burden on the user), or have environment variables that vary by application. The site no-color.org suggests a simple NO_COLOR environment variable as a hint to applications (see https://no-color.org) as a simple way for "color impaired" people to disable color output. This code leverages the NO_COLOR environment variable to set the same flag as the "-n" flag.