const classjig::Term

sys::Obj
  jig::Term

Terminal and process utilities.

bold

Source

const static Str bold := "\u001b[1m"

clearLine

Source

const static Str clearLine := "\r\u001b[2K"

dim

Source

const static Str dim := "\u001b[2m"

exec

Source

static Int exec(Str[] cmd, |Str onLine, |->Bool? isDone := null)

Run process and deliver each line of merged stdout/stderr to onLine; returns exit code. Process.join does not wait for the output pump thread, so after exit we wait until isDone returns true, or output has been quiet for 250ms.

fant

Source

static Str[] fant()

Path to fant launcher for current runtime.

green

Source

const static Str green := "\u001b[32m"

isTty

Source

static Bool isTty()

Is stdout an interactive terminal.

magenta

Source

const static Str magenta := "\u001b[35m"

red

Source

const static Str red := "\u001b[31m"

reset

Source

const static Str reset := "\u001b[0m"

upClearLine

Source

const static Str upClearLine := "\u001b[1A\u001b[2K"

width

Source

static Int width()

Terminal width in columns, or 80 if unknown.