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

Method TerminalWidth

pkg/iostreams/iostreams.go:426–432  ·  view source on GitHub ↗

TerminalWidth returns the width of the terminal that controls the process

()

Source from the content-addressed store, hash-verified

424
425// TerminalWidth returns the width of the terminal that controls the process
426func (s *IOStreams) TerminalWidth() int {
427 w, _, err := s.term.Size()
428 if err == nil && w > 0 {
429 return w
430 }
431 return DefaultWidth
432}
433
434func (s *IOStreams) ColorScheme() *ColorScheme {
435 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
viewRunFunction · 0.80
apiRunFunction · 0.80

Calls 1

SizeMethod · 0.65

Tested by 1