Skip to content

Instantly share code, notes, and snippets.

@jbadger3
Created September 9, 2022 17:28
Show Gist options
  • Save jbadger3/6974a458401603ca8e0bd026b60dd0ab to your computer and use it in GitHub Desktop.
Save jbadger3/6974a458401603ca8e0bd026b60dd0ab to your computer and use it in GitHub Desktop.
on_command_line_applications_in_swift
import Terminus
let terminal = Terminal.shared
terminal.write("I am bold and underlined.\n", attributes: [.bold, .underline])
let greenColor = Color(r:0, g:255, b:0)
terminal.write("Grass is green.\n", attributes: [.color(greenColor)])
let palette = XTermPalette()
let blueOneYellow = ColorPair(foreground: palette.Blue1, background: palette.Yellow1)
terminal.write("Blue on yellow", attributes: [.colorPair(blueOneYellow)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment