IsAccessibleMode detects if accessibility mode should be enabled based on environment variables. Accessibility mode is enabled when: - ACCESSIBLE environment variable is set to any value - TERM environment variable is set to "dumb" - NO_COLOR environment variable is set to any value This function s
()
| 13 | // - Simplify interactive elements |
| 14 | // - Use plain text instead of fancy formatting |
| 15 | func IsAccessibleMode() bool { |
| 16 | return os.Getenv("ACCESSIBLE") != "" || //nolint:osgetenvlibrary |
| 17 | os.Getenv("TERM") == "dumb" || //nolint:osgetenvlibrary |
| 18 | os.Getenv("NO_COLOR") != "" //nolint:osgetenvlibrary |
| 19 | } |