dhylands / rshell

Remote Shell for MicroPython
MIT License
955 stars 137 forks source link

observe NO_COLOR from no-color.org #206

Closed tpbrisco closed 9 months ago

tpbrisco commented 1 year ago

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.