github.com/mutagen-io/mutagen@v0.18.0-rc1/cmd/output_posix.go (about)

     1  //go:build !windows
     2  
     3  package cmd
     4  
     5  const (
     6  	// statusLineFormat is the format string to use for status line printing. On
     7  	// POSIX systems, we truncate and pad messages (with spaces) so that the
     8  	// printed content is exactly 80 characters. This ensures that (a) all
     9  	// content from the previous line is overwritten, (b) the cursor is not
    10  	// flashing back and forth to different positions at the end of the printed
    11  	// content, and (c) that the content doesn't overflow the terminal. Of
    12  	// course, the last condition is contingent on the terminal being at least
    13  	// 80 characters wide, and newlines will occur if that's not the case, but
    14  	// 80 characters is a reasonable minimum based on the minimum width of a
    15  	// VT100 terminal.
    16  	statusLineFormat = "\r%-80.80s"
    17  	// statusLineClearFormat is the format string to use for printing an empty
    18  	// string to clear the status line. It adds a carriage return to return the
    19  	// cursor to the beginning of the line.
    20  	statusLineClearFormat = statusLineFormat + "\r"
    21  )