Documentation
¶
Overview ¶
Package cmd contains various facilities for the command line portion of Mutagen.
Index ¶
Constants ¶
const (
DelimiterLine = "--------------------------------------------------------------------------------"
)
Variables ¶
TerminationSignals are those signals which Mutagen considers to be requesting termination.
Functions ¶
func Fatal ¶
func Fatal(err error)
Fatal prints an error message to standard error and then terminates the process with an error exit code.
func HandleTerminalCompatibility ¶ added in v0.6.0
func HandleTerminalCompatibility()
HandleTerminalCompatibility automatically restarts the current process inside a terminal compatibility emulator if necessary. It currently only handles the case of mintty consoles on Windows requiring a relaunch of the current command inside winpty.
Types ¶
type StatusLinePrinter ¶ added in v0.6.0
type StatusLinePrinter struct { // UseStandardError causes the printer to use standard error for its output // instead of standard output (the default). UseStandardError bool // contains filtered or unexported fields }
StatusLinePrinter provides printing facilities for dynamically updating status lines in the console. It supports colorized printing.
func (*StatusLinePrinter) BreakIfNonEmpty ¶ added in v0.6.0
func (p *StatusLinePrinter) BreakIfNonEmpty()
BreakIfNonEmpty prints a newline character if the current line is non-empty.
func (*StatusLinePrinter) Clear ¶ added in v0.6.0
func (p *StatusLinePrinter) Clear()
Clear clears any content on the status line and moves the cursor back to the beginning of the line.
func (*StatusLinePrinter) Print ¶ added in v0.6.0
func (p *StatusLinePrinter) Print(message string)
Print prints a message to the status line, overwriting any existing content. Color escape sequences are supported. Messages will be truncated to a platform-dependent maximum length and padded appropriately.