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

Method TerminalTheme

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

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