cmd

package
v0.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2020 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package cmd contains various facilities for the command line portion of Mutagen.

Index

Constants

View Source
const (
	DelimiterLine = "--------------------------------------------------------------------------------"
)

Variables

View Source
var TerminationSignals = []os.Signal{
	syscall.SIGINT,
	syscall.SIGTERM,
}

TerminationSignals are those signals which Mutagen considers to be requesting termination.

Functions

func Error

func Error(err error)

Error prints an error message to standard error.

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.

func Warning

func Warning(message string)

Warning prints a warning message to standard error.

Types

type StatusLinePrinter added in v0.6.0

type StatusLinePrinter struct {
	// 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL