MCPcopy
hub / github.com/cli/cli / TerminalWidth

Method TerminalWidth

pkg/iostreams/iostreams.go:413–419  ·  view source on GitHub ↗

TerminalWidth returns the width of the terminal that controls the process

()

Source from the content-addressed store, hash-verified

411
412// TerminalWidth returns the width of the terminal that controls the process
413func (s *IOStreams) TerminalWidth() int {
414 w, _, err := s.term.Size()
415 if err == nil && w > 0 {
416 return w
417 }
418 return DefaultWidth
419}
420
421func (s *IOStreams) ColorScheme() *ColorScheme {
422 return &ColorScheme{

Callers 15

WriteMethod · 0.80
printHumanViewFunction · 0.80
printHumanCommentFunction · 0.80
renderReleaseTTYFunction · 0.80
renderMarkdownWithFormatFunction · 0.80
printResultsFunction · 0.80
longPagerFunction · 0.80
printHumanIssuePreviewFunction · 0.80
viewRunFunction · 0.80
statusLineFunction · 0.80
viewRunFunction · 0.80
apiRunFunction · 0.80

Calls 1

SizeMethod · 0.65

Tested by 1