Skip to content

Commit 34d0354

Browse files
committed
docs(design): align auto-detection section with actual initColorState implementation
The design doc claimed explicit os.Stdout.IsTerminal() / os.Stderr.IsTerminal() checks, but the implementation only checks NO_COLOR and delegates TTY detection to fatih/color defaults. Updated the doc to reflect the actual approach. Signed-off-by: spencercjh <spencercjh@gmail.com>
1 parent df687da commit 34d0354

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/plans/2026-03-30-cli-ux-improvements-design.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ Register `ValidArgsFunction` on enum-type flags for shell completion:
7474
- `Hintf(format, args...)` — prints cyan hint prefix + yellow content
7575
- `Skipf(format, args...)` — prints dim skip message
7676
- Auto-detection:
77-
- Respect `NO_COLOR` environment variable (https://no-color.org/)
78-
- Check `os.Stdout.IsTerminal()` / `os.Stderr.IsTerminal()` — disable color when piped
79-
- Use `color.NoColor` from fatih/color which handles both
77+
- Respect `NO_COLOR` environment variable (https://no-color.org/) — mere presence disables color
78+
- Otherwise rely on `fatih/color` defaults for terminal detection and color enable/disable behavior
79+
- Initialize `color.NoColor` in `internal/cli/initColorState()` instead of performing explicit `IsTerminal` checks
8080

8181
### Output Architecture
8282

0 commit comments

Comments
 (0)