MCPcopy
hub / github.com/cli/cli / TerminalTheme

Method TerminalTheme

pkg/iostreams/iostreams.go:133–139  ·  view source on GitHub ↗

TerminalTheme returns "light", "dark", or "none" depending on the background color of the terminal.

()

Source from the content-addressed store, hash-verified

131
132// TerminalTheme returns "light", "dark", or "none" depending on the background color of the terminal.
133func (s *IOStreams) TerminalTheme() string {
134 if s.terminalTheme == "" {
135 s.DetectTerminalTheme()
136 }
137
138 return s.terminalTheme
139}
140
141func (s *IOStreams) SetColorEnabled(colorEnabled bool) {
142 s.colorOverride = true

Callers 15

ColorSchemeMethod · 0.95
printHumanViewFunction · 0.80
printHumanCommentFunction · 0.80
renderReleaseTTYFunction · 0.80
renderMarkdownWithFormatFunction · 0.80
printResultsFunction · 0.80
longPagerFunction · 0.80
printHumanIssuePreviewFunction · 0.80
viewRunFunction · 0.80
viewRunFunction · 0.80
renderMarkdownPreviewFunction · 0.80
printHumanPrPreviewFunction · 0.80

Calls 1

DetectTerminalThemeMethod · 0.95

Tested by

no test coverage detected