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

Method RefreshScreen

pkg/iostreams/iostreams.go:415–422  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

413}
414
415func (s *IOStreams) RefreshScreen() {
416 if s.IsStdoutTTY() {
417 // Move cursor to 0,0
418 fmt.Fprint(s.Out, "\x1b[0;0H")
419 // Clear from cursor to bottom of screen
420 fmt.Fprint(s.Out, "\x1b[J")
421 }
422}
423
424// TerminalWidth returns the width of the terminal that controls the process
425func (s *IOStreams) TerminalWidth() int {

Callers 2

watchRunFunction · 0.80
checksRunFunction · 0.80

Calls 1

IsStdoutTTYMethod · 0.95

Tested by

no test coverage detected