tsm/src/term.nim

18 lines
381 B
Nim
Raw Normal View History

import std/strutils
import bbansi
2023-11-10 13:51:00 -06:00
export bbansi
const
sep = " [magenta]|[/] "
prefix = "[cyan]tsm[/]" & sep
errPrefix = prefix & "[red]error[/]" & sep
proc termEcho*(x: varargs[string, `$`]) =
bbEcho prefix, x.join(" ")
proc termError*(x: varargs[string, `$`]) =
bbEcho errPrefix, x.join(" ")
proc termQuit*(x: varargs[string, `$`]) =
termError x
quit QuitFailure