Documentation
¶
Overview ¶
Package uipref centralizes runtime UX preferences (quiet output and no-color) so individual commands can consult a single source of truth instead of re-implementing env-var parsing.
Honored environment variables:
GITMAP_QUIET=1 - suppress spinners and decorative banners GITMAP_NO_COLOR=1 - strip / skip ANSI color escapes NO_COLOR (any val) - de-facto cross-tool convention (https://no-color.org)
Item #13 of the post-v6.53.0 suggestions list. Wired into the shared clone runner (clonespinner) first; future call sites (chrome profile copy, history, backup, ssh status) should consult IsQuiet() / IsNoColor() before emitting decorative output.
Index ¶
Constants ¶
const ( EnvQuiet = "GITMAP_QUIET" EnvNoColor = "GITMAP_NO_COLOR" EnvNoColorStd = "NO_COLOR" )
Env var names — kept here (not constants/) because this package is the only legitimate reader.
Variables ¶
This section is empty.
Functions ¶
func IsNoColor ¶
func IsNoColor() bool
IsNoColor reports whether ANSI color codes should be skipped. NO_COLOR is honored per the cross-tool convention: any value (including empty string set explicitly) disables color, but we also accept the project-scoped GITMAP_NO_COLOR for parity with GITMAP_QUIET.
Types ¶
This section is empty.