Yeesh.Output (Yeesh v0.8.3)

View Source

ANSI output formatting helpers for terminal commands.

Commands can use these helpers to produce colored and styled output. xterm.js renders the ANSI escape sequences on the client.

Example

alias Yeesh.Output

output = Output.green("Success: ") <> Output.bold("deployed v1.2.3")

Summary

Functions

Colors text blue.

Wraps text in bold.

Colors text cyan.

Wraps text in dim style.

Formats an error message (red, prefixed with 'error:').

Colors text gray.

Colors text green.

Wraps text in italic.

Colors text magenta.

Colors text red.

Resets all ANSI formatting.

Wraps text in underline.

Formats a warning message (yellow, prefixed with 'warning:').

Colors text white.

Colors text yellow.

Functions

blue(text)

@spec blue(String.t()) :: String.t()

Colors text blue.

bold(text)

@spec bold(String.t()) :: String.t()

Wraps text in bold.

cyan(text)

@spec cyan(String.t()) :: String.t()

Colors text cyan.

dim(text)

@spec dim(String.t()) :: String.t()

Wraps text in dim style.

error(message)

@spec error(String.t()) :: String.t()

Formats an error message (red, prefixed with 'error:').

gray(text)

@spec gray(String.t()) :: String.t()

Colors text gray.

green(text)

@spec green(String.t()) :: String.t()

Colors text green.

italic(text)

@spec italic(String.t()) :: String.t()

Wraps text in italic.

magenta(text)

@spec magenta(String.t()) :: String.t()

Colors text magenta.

red(text)

@spec red(String.t()) :: String.t()

Colors text red.

reset()

@spec reset() :: String.t()

Resets all ANSI formatting.

underline(text)

@spec underline(String.t()) :: String.t()

Wraps text in underline.

warning(message)

@spec warning(String.t()) :: String.t()

Formats a warning message (yellow, prefixed with 'warning:').

white(text)

@spec white(String.t()) :: String.t()

Colors text white.

yellow(text)

@spec yellow(String.t()) :: String.t()

Colors text yellow.