Documentation
¶
Overview ¶
Package output prints what a command has to say: styled with Lip Gloss on a terminal, plain text in a pipe, in CI or for an agent, and JSON when asked, so every command speaks the same way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Interactive ¶
Interactive says whether a person is at the terminal for this command: both input and output are terminals, CI is unset, and no agent is running it. It is the one place every idea and bet command decides between a person at a terminal (pickers, styles, confirms) and a pipe, CI or an agent (plain text or --json, errors instead of questions). getenv reads CI from the command's environment.
func IsTerminal ¶
IsTerminal reports whether a person is at f: it is a character device, and not the null device, which is one too.
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer writes a command's output, styled or plain.
func For ¶
For makes a Printer on w, styled when w is a terminal and NO_COLOR is unset in the environment lookup reads, the command's. Set to anything, even "", NO_COLOR keeps it plain.