MCPcopy Create free account
hub / github.com/cli/cli / TerminalTheme

Method TerminalTheme

pkg/iostreams/iostreams.go:144–150  ·  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

142
143// TerminalTheme returns "light", "dark", or "none" depending on the background color of the terminal.
144func (s *IOStreams) TerminalTheme() string {
145 if s.terminalTheme == "" {
146 s.DetectTerminalTheme()
147 }
148
149 return s.terminalTheme
150}
151
152func (s *IOStreams) SetColorEnabled(colorEnabled bool) {
153 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